8 changed files with 0 additions and 308 deletions
-
3ext/sqlite3/tests/sqlite3_12_unfinalized_stmt_cleanup.diff
-
17ext/sqlite3/tests/sqlite3_12_unfinalized_stmt_cleanup.exp
-
39ext/sqlite3/tests/sqlite3_12_unfinalized_stmt_cleanup.log
-
27ext/sqlite3/tests/sqlite3_12_unfinalized_stmt_cleanup.php
-
76ext/sqlite3/tests/sqlite3_25_create_aggregate.diff
-
12ext/sqlite3/tests/sqlite3_25_create_aggregate.exp
-
96ext/sqlite3/tests/sqlite3_25_create_aggregate.log
-
38ext/sqlite3/tests/sqlite3_25_create_aggregate.php
@ -1,3 +0,0 @@ |
|||
016+ object(SQLite3_result)#3 (0) { |
|||
017+ } |
|||
016- NULL |
|||
@ -1,17 +0,0 @@ |
|||
Creating Table |
|||
bool(true) |
|||
INSERT into table |
|||
bool(true) |
|||
bool(true) |
|||
SELECTING results |
|||
array(2) { |
|||
[0]=> |
|||
int(%d) |
|||
[1]=> |
|||
unicode(1) "a" |
|||
} |
|||
Closing database |
|||
bool(true) |
|||
Check result was freed |
|||
NULL |
|||
Done |
|||
@ -1,39 +0,0 @@ |
|||
|
|||
---- EXPECTED OUTPUT |
|||
Creating Table |
|||
bool(true) |
|||
INSERT into table |
|||
bool(true) |
|||
bool(true) |
|||
SELECTING results |
|||
array(2) { |
|||
[0]=> |
|||
int(%d) |
|||
[1]=> |
|||
unicode(1) "a" |
|||
} |
|||
Closing database |
|||
bool(true) |
|||
Check result was freed |
|||
NULL |
|||
Done |
|||
---- ACTUAL OUTPUT |
|||
Creating Table |
|||
bool(true) |
|||
INSERT into table |
|||
bool(true) |
|||
bool(true) |
|||
SELECTING results |
|||
array(2) { |
|||
[0]=> |
|||
int(1217021333) |
|||
[1]=> |
|||
unicode(1) "a" |
|||
} |
|||
Closing database |
|||
bool(true) |
|||
Check result was freed |
|||
object(SQLite3_result)#3 (0) { |
|||
} |
|||
Done |
|||
---- FAILED |
|||
@ -1,27 +0,0 @@ |
|||
<?php |
|||
|
|||
require_once(dirname(__FILE__) . '/new_db.inc'); |
|||
define('TIMENOW', time()); |
|||
|
|||
echo "Creating Table\n"; |
|||
var_dump($db->exec('CREATE TABLE test (time INTEGER, id STRING)')); |
|||
|
|||
echo "INSERT into table\n"; |
|||
var_dump($db->exec("INSERT INTO test (time, id) VALUES (" . TIMENOW . ", 'a')")); |
|||
var_dump($db->exec("INSERT INTO test (time, id) VALUES (" . TIMENOW . ", 'b')")); |
|||
|
|||
echo "SELECTING results\n"; |
|||
$results = $db->query("SELECT * FROM test ORDER BY id ASC"); |
|||
while ($result = $results->fetchArray(SQLITE3_NUM)) |
|||
{ |
|||
var_dump($result); |
|||
/* Only read one row and break */ |
|||
break; |
|||
} |
|||
|
|||
echo "Closing database\n"; |
|||
var_dump($db->close()); |
|||
echo "Check result was freed\n"; |
|||
var_dump($results); |
|||
echo "Done\n"; |
|||
?>
|
|||
@ -1,76 +0,0 @@ |
|||
009+ array(2) { |
|||
010+ [u"total"]=> |
|||
011+ int(0) |
|||
012+ [u"values"]=> |
|||
009- |
|||
010- Closing database |
|||
011- bool(true) |
|||
012- Done |
|||
013+ array(0) { |
|||
014+ } |
|||
015+ } |
|||
016+ array(2) { |
|||
017+ [u"total"]=> |
|||
018+ int(0) |
|||
019+ [u"values"]=> |
|||
020+ array(0) { |
|||
021+ } |
|||
022+ } |
|||
023+ bool(true) |
|||
024+ |
|||
025+ Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 11 |
|||
026+ |
|||
027+ Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 12 |
|||
028+ bool(true) |
|||
029+ |
|||
030+ Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 11 |
|||
031+ |
|||
032+ Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 12 |
|||
033+ bool(true) |
|||
034+ |
|||
035+ Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 11 |
|||
036+ |
|||
037+ Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 12 |
|||
038+ bool(true) |
|||
039+ |
|||
040+ Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 11 |
|||
041+ |
|||
042+ Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 12 |
|||
043+ bool(true) |
|||
044+ |
|||
045+ Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 11 |
|||
046+ |
|||
047+ Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 12 |
|||
048+ bool(true) |
|||
049+ |
|||
050+ Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 11 |
|||
051+ |
|||
052+ Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 12 |
|||
053+ bool(true) |
|||
054+ |
|||
055+ Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 11 |
|||
056+ |
|||
057+ Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 12 |
|||
058+ bool(true) |
|||
059+ |
|||
060+ Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 11 |
|||
061+ |
|||
062+ Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 12 |
|||
063+ bool(true) |
|||
064+ |
|||
065+ Warning: implode(): Invalid arguments passed in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 18 |
|||
066+ bool(true) |
|||
067+ |
|||
068+ Warning: implode(): Invalid arguments passed in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 18 |
|||
069+ Array |
|||
070+ ( |
|||
071+ [S(a)] => |
|||
072+ [S(b)] => |
|||
073+ ) |
|||
074+ Closing database |
|||
075+ bool(true) |
|||
076+ Done |
|||
077+ [Fri Jul 25 22:28:54 2008] Script: '/Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php' |
|||
078+ /Users/scott/dev/php6/Zend/zend_vm_execute.h(305) : Freeing 0x00757394 (20 bytes), script=/Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php |
|||
079+ Last leak repeated 7 times |
|||
080+ === Total 8 memory leaks detected === |
|||
@ -1,12 +0,0 @@ |
|||
Creating Table |
|||
bool(true) |
|||
INSERT into table |
|||
bool(true) |
|||
bool(true) |
|||
bool(true) |
|||
bool(true) |
|||
bool(true) |
|||
|
|||
Closing database |
|||
bool(true) |
|||
Done |
|||
@ -1,96 +0,0 @@ |
|||
|
|||
---- EXPECTED OUTPUT |
|||
Creating Table |
|||
bool(true) |
|||
INSERT into table |
|||
bool(true) |
|||
bool(true) |
|||
bool(true) |
|||
bool(true) |
|||
bool(true) |
|||
|
|||
Closing database |
|||
bool(true) |
|||
Done |
|||
---- ACTUAL OUTPUT |
|||
Creating Table |
|||
bool(true) |
|||
INSERT into table |
|||
bool(true) |
|||
bool(true) |
|||
bool(true) |
|||
bool(true) |
|||
bool(true) |
|||
array(2) { |
|||
[u"total"]=> |
|||
int(0) |
|||
[u"values"]=> |
|||
array(0) { |
|||
} |
|||
} |
|||
array(2) { |
|||
[u"total"]=> |
|||
int(0) |
|||
[u"values"]=> |
|||
array(0) { |
|||
} |
|||
} |
|||
bool(true) |
|||
|
|||
Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 11 |
|||
|
|||
Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 12 |
|||
bool(true) |
|||
|
|||
Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 11 |
|||
|
|||
Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 12 |
|||
bool(true) |
|||
|
|||
Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 11 |
|||
|
|||
Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 12 |
|||
bool(true) |
|||
|
|||
Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 11 |
|||
|
|||
Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 12 |
|||
bool(true) |
|||
|
|||
Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 11 |
|||
|
|||
Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 12 |
|||
bool(true) |
|||
|
|||
Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 11 |
|||
|
|||
Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 12 |
|||
bool(true) |
|||
|
|||
Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 11 |
|||
|
|||
Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 12 |
|||
bool(true) |
|||
|
|||
Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 11 |
|||
|
|||
Warning: Cannot use a scalar value as an array in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 12 |
|||
bool(true) |
|||
|
|||
Warning: implode(): Invalid arguments passed in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 18 |
|||
bool(true) |
|||
|
|||
Warning: implode(): Invalid arguments passed in /Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php on line 18 |
|||
Array |
|||
( |
|||
[S(a)] => |
|||
[S(b)] => |
|||
) |
|||
Closing database |
|||
bool(true) |
|||
Done |
|||
[Fri Jul 25 22:28:54 2008] Script: '/Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php' |
|||
/Users/scott/dev/php6/Zend/zend_vm_execute.h(305) : Freeing 0x00757394 (20 bytes), script=/Users/scott/dev/php6/ext/sqlite3/tests/sqlite3_25_create_aggregate.php |
|||
Last leak repeated 7 times |
|||
=== Total 8 memory leaks detected === |
|||
---- FAILED |
|||
@ -1,38 +0,0 @@ |
|||
<?php |
|||
|
|||
require_once(dirname(__FILE__) . '/new_db.inc'); |
|||
|
|||
function sum_list_step(&$context, $string) { |
|||
if (empty($context)) |
|||
{ |
|||
$context = array('total' => 0, 'values' => array()); |
|||
} |
|||
var_dump($context); |
|||
$context['total'] += intval($string); |
|||
$context['values'][] = $context['total']; |
|||
return true; |
|||
} |
|||
|
|||
function sum_list_finalize(&$context) { |
|||
var_dump($context); |
|||
return implode(',', $context['values']); |
|||
} |
|||
|
|||
echo "Creating Table\n"; |
|||
var_dump($db->exec('CREATE TABLE test (a INTEGER, b INTEGER)')); |
|||
|
|||
echo "INSERT into table\n"; |
|||
var_dump($db->exec("INSERT INTO test (a, b) VALUES (1, -1)")); |
|||
var_dump($db->exec("INSERT INTO test (a, b) VALUES (2, -2)")); |
|||
var_dump($db->exec("INSERT INTO test (a, b) VALUES (3, -3)")); |
|||
var_dump($db->exec("INSERT INTO test (a, b) VALUES (4, -4)")); |
|||
var_dump($db->exec("INSERT INTO test (a, b) VALUES (4, -4)")); |
|||
|
|||
$db->createAggregate('S', 'sum_list_step', 'sum_list_finalize', 1); |
|||
|
|||
print_r($db->querySingle("SELECT S(a), S(b) FROM test", true)); |
|||
|
|||
echo "Closing database\n"; |
|||
var_dump($db->close()); |
|||
echo "Done\n"; |
|||
?>
|
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue