From cca6f5a2f8c43f560f2f11c838577c1ccc991c1a Mon Sep 17 00:00:00 2001 From: Jani Taskinen Date: Sat, 26 Jul 2008 23:45:02 +0000 Subject: [PATCH] jfc..*SIGH* --- .../sqlite3_12_unfinalized_stmt_cleanup.diff | 3 - .../sqlite3_12_unfinalized_stmt_cleanup.exp | 17 ---- .../sqlite3_12_unfinalized_stmt_cleanup.log | 39 -------- .../sqlite3_12_unfinalized_stmt_cleanup.php | 27 ------ .../tests/sqlite3_25_create_aggregate.diff | 76 --------------- .../tests/sqlite3_25_create_aggregate.exp | 12 --- .../tests/sqlite3_25_create_aggregate.log | 96 ------------------- .../tests/sqlite3_25_create_aggregate.php | 38 -------- 8 files changed, 308 deletions(-) delete mode 100644 ext/sqlite3/tests/sqlite3_12_unfinalized_stmt_cleanup.diff delete mode 100644 ext/sqlite3/tests/sqlite3_12_unfinalized_stmt_cleanup.exp delete mode 100644 ext/sqlite3/tests/sqlite3_12_unfinalized_stmt_cleanup.log delete mode 100644 ext/sqlite3/tests/sqlite3_12_unfinalized_stmt_cleanup.php delete mode 100644 ext/sqlite3/tests/sqlite3_25_create_aggregate.diff delete mode 100644 ext/sqlite3/tests/sqlite3_25_create_aggregate.exp delete mode 100644 ext/sqlite3/tests/sqlite3_25_create_aggregate.log delete mode 100644 ext/sqlite3/tests/sqlite3_25_create_aggregate.php diff --git a/ext/sqlite3/tests/sqlite3_12_unfinalized_stmt_cleanup.diff b/ext/sqlite3/tests/sqlite3_12_unfinalized_stmt_cleanup.diff deleted file mode 100644 index ed23dc258c..0000000000 --- a/ext/sqlite3/tests/sqlite3_12_unfinalized_stmt_cleanup.diff +++ /dev/null @@ -1,3 +0,0 @@ -016+ object(SQLite3_result)#3 (0) { -017+ } -016- NULL \ No newline at end of file diff --git a/ext/sqlite3/tests/sqlite3_12_unfinalized_stmt_cleanup.exp b/ext/sqlite3/tests/sqlite3_12_unfinalized_stmt_cleanup.exp deleted file mode 100644 index 7737741832..0000000000 --- a/ext/sqlite3/tests/sqlite3_12_unfinalized_stmt_cleanup.exp +++ /dev/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 \ No newline at end of file diff --git a/ext/sqlite3/tests/sqlite3_12_unfinalized_stmt_cleanup.log b/ext/sqlite3/tests/sqlite3_12_unfinalized_stmt_cleanup.log deleted file mode 100644 index de894c21fb..0000000000 --- a/ext/sqlite3/tests/sqlite3_12_unfinalized_stmt_cleanup.log +++ /dev/null @@ -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 diff --git a/ext/sqlite3/tests/sqlite3_12_unfinalized_stmt_cleanup.php b/ext/sqlite3/tests/sqlite3_12_unfinalized_stmt_cleanup.php deleted file mode 100644 index 30893ee6e6..0000000000 --- a/ext/sqlite3/tests/sqlite3_12_unfinalized_stmt_cleanup.php +++ /dev/null @@ -1,27 +0,0 @@ -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"; -?> diff --git a/ext/sqlite3/tests/sqlite3_25_create_aggregate.diff b/ext/sqlite3/tests/sqlite3_25_create_aggregate.diff deleted file mode 100644 index dc19f11ebe..0000000000 --- a/ext/sqlite3/tests/sqlite3_25_create_aggregate.diff +++ /dev/null @@ -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 === \ No newline at end of file diff --git a/ext/sqlite3/tests/sqlite3_25_create_aggregate.exp b/ext/sqlite3/tests/sqlite3_25_create_aggregate.exp deleted file mode 100644 index b6b4d89b7b..0000000000 --- a/ext/sqlite3/tests/sqlite3_25_create_aggregate.exp +++ /dev/null @@ -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 \ No newline at end of file diff --git a/ext/sqlite3/tests/sqlite3_25_create_aggregate.log b/ext/sqlite3/tests/sqlite3_25_create_aggregate.log deleted file mode 100644 index 75c2a74b93..0000000000 --- a/ext/sqlite3/tests/sqlite3_25_create_aggregate.log +++ /dev/null @@ -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 diff --git a/ext/sqlite3/tests/sqlite3_25_create_aggregate.php b/ext/sqlite3/tests/sqlite3_25_create_aggregate.php deleted file mode 100644 index 2423a4edce..0000000000 --- a/ext/sqlite3/tests/sqlite3_25_create_aggregate.php +++ /dev/null @@ -1,38 +0,0 @@ - 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"; -?> -- 2.50.1