AryaWu/sqlite
0
1# 2010 May 122#3# The author disclaims copyright to this source code. In place of4# a legal notice, here is a blessing:5#6# May you do good and not evil.7# May you find forgiveness for yourself and forgive others.8# May you share freely, never taking more than you give.9#10#***********************************************************************11# This file implements regression tests for SQLite library. The12# focus of this script testing a bug found in the OP_Variable optimizer13#14 15set testdir [file dirname $argv0]16source $testdir/tester.tcl17 18do_test bug-20100512-1 {19 set DB [sqlite3_connection_pointer db]20 set SQL {SELECT case when 1 then 99 else ? end + ?}21 set STMT [sqlite3_prepare_v2 $DB $SQL -1 TAIL]22 set TAIL23} {}24do_test bug-20100512-2 {25 sqlite3_bind_parameter_count $STMT26} 227do_test bug-20100512-3 {28 sqlite3_bind_int $STMT 1 12329 sqlite3_bind_int $STMT 2 45630 sqlite3_step $STMT31 sqlite3_column_int $STMT 032} {555}33sqlite3_finalize $STMT34 35finish_test36 