forked from mackyle/sqlite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove the OP_Variable optimization of check-in [48b77b04935d894] sin…
…ce it can lead to malfunctions as described in ticket [26ff0c82d1e90].
- Loading branch information
D. Richard Hipp
committed
May 12, 2010
1 parent
ac401a2
commit cdac03a
Showing
3 changed files
with
45 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# 2010 May 12 | ||
# | ||
# The author disclaims copyright to this source code. In place of | ||
# a legal notice, here is a blessing: | ||
# | ||
# May you do good and not evil. | ||
# May you find forgiveness for yourself and forgive others. | ||
# May you share freely, never taking more than you give. | ||
# | ||
#*********************************************************************** | ||
# This file implements regression tests for SQLite library. The | ||
# focus of this script testing a bug found in the OP_Variable optimizer | ||
# | ||
|
||
set testdir [file dirname $argv0] | ||
source $testdir/tester.tcl | ||
|
||
do_test bug-20100512-1 { | ||
set DB [sqlite3_connection_pointer db] | ||
set SQL {SELECT case when 1 then 99 else ? end + ?} | ||
set STMT [sqlite3_prepare_v2 $DB $SQL -1 TAIL] | ||
set TAIL | ||
} {} | ||
do_test bug-20100512-2 { | ||
sqlite3_bind_parameter_count $STMT | ||
} 2 | ||
do_test bug-20100512-3 { | ||
sqlite3_bind_int $STMT 1 123 | ||
sqlite3_bind_int $STMT 2 456 | ||
sqlite3_step $STMT | ||
sqlite3_column_int $STMT 0 | ||
} {555} | ||
sqlite3_finalize $STMT |