###########
# t'.So every change here will affect
# Tests for prepared statements: INSERT/DELETE/UPDATE... #
# #
##############################################################
#
# NOTE: PLEASE SEE ps_1general.test (bottom)
# BEFORE ADDING NEW TEST CASES HERE !!!
#
# Please be aware,#several .
# stored within the subdirectory 't'. So every#
# several#Please not thestructure(ROPALTER.)ofthe
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
# -table nearly all columntypes
#
#
/java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 45
#
-
# type the storage isjava.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 69
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 of canbe in
# include/ps_create.inc CREATE TABLE ...
i all INSERT
#
# ---source include/ps_renew.inc
# The
#---'t1 =2
#----java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
-- java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 54
-java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 16
- java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 29
set@=''
preparefromd from 2 ;
execute stmt1;
selecta, from @;
# delete with row not found
;
## delete with one parameter in the java.lang.StringIndexOutOfBoundsException: Range [0, 41) out of bounds for length 40
intot1 values0)
a=;
prepare from'elete where =';
execute stmt1 using @arg00;
select set#update withoutparameter
executeprepare stmt1 from'pdate t1set ='a=' a=2';
execute stmt1;
#selectbfrom t1wherea2java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
preparestmt1from t table java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
## updatestmt1usingjava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 29
prepare stmt1 from 'execute using @rg00;
execute stmt1;
select a,b froma, from t1wherea=2;
#date
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 14
## update withexecuteusing @; set selecta, from where =@rg00java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
prepare stmt1 from 'row found update
set =2000java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
selecta,from t1 where a=2; set @arg00='two';
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
select a,b from t1 where a=2;
## update with one parameter in the where cause set @arg00=2;
prepare stmt1 from 'update t1 set b=ULL ?' ;
execute java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 27
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 34
updatet1set=two' where a=@rg00;
# row not found in update set @arg00=2000;
execute stmt1 using @arg00;
select a,b from t1 where a=@select a,b from t1 where a=@arg00
## update select a,b f t1 where a=arg01; set @execute stmt1 @rg00,@arg01;
g0122;
prepare stmt1 from 'update t1 set a=? where a=?' ;
# dummy update
execute stmt1set @rg01=2;
select a,b from t1 where a=@arg00;
execute stmt1 using @arg01, @arg00;
select a,b from t1 where a=@arg01;
execute stmt1 using @arg00, @arg01;
select a,b from t1 where a=@arg00; set @arg00=NULL; set @arg01=2;execute stmt1 using @arg00, @arg01; set sql_mode = ''; set sql_mode = default; set sql_mode = default;
select a,b from t1 order select a,b from t1order by a; set @arg00=0;
execute stmt1 using @arg01,@rg00;
select a,b from t1 order by a;
## update with subquery and execute stmt1 using @arg01, @arg00; set @arg00=23;
@arg01'wo; set @arg02=2; set @java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 set @arg04=2;
--disable_warnings @arg00=23;
drop table if exists t2;
--enable_warnings
# t2 arg01''
create @rg02=;
prepare set@rg03=two; andset a=;
where-disable_warnings
--enable_info-nable_warnings
execute#t2 will of type'YISAM'
--disable_info
select acreate t2 selecta from t1 ;
prepare prepare stmt1 'pdate set?where b=java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 and a notin (select ? from t2
where b = ? or a = ?)';
-enable_info
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 60
-
select a,select a,b from t1 where a = java.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 47
where a=)'
# t2 is now of table type'$type'
# The test battery for table type'MERGE' gets here only a 'MYISAM'--enable_info
# -
java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 1
create java.lang.StringIndexOutOfBoundsException: Range [20, 21) out of bounds for length 20
(
a int, b varcharjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
keya
primarykey()
t2(,b) select , from ;
prepare a,)select a fromt1java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 and a in (select ? from t2
where b = ? or a = ?)';
--enable_info
execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04 ;
--disable_info
select a,b from t1 where a = @arg00 ;
prepare stmt1 from 'update t1 set a=? where b=? and a (elect?fromt2
where b = ? or a = ?)';
--enable_info
where =?ora= );
--disable_info
select a,b from t1 order-enable_info
drop stmt1 arg00,a arg02,@rg03 @ ;
-disable_info setselectab t1 = @arg00 java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
prepare stmt1 from 'update t1 set b=''bla''
where a=2
limit 1';
execute stmt1 ;
select a,b from t1 where b where b=?or ?);
java.lang.StringIndexOutOfBoundsException: Range [18, 7) out of bounds for length 63
execute java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
## insert without parameter
prepare stmt1 from 'insert into t1 values(5, ''five'' )';
execute stmt1;
select a,b from t1 where a = 5;
## insert with one parameter in values part set @arg00='six' ;
prepare stmt1 from 'insert into t1 values(6, ? )';
execute stmt1 using @arg00;
select a,b java.lang.StringIndexOutOfBoundsException: Range [0, 15) out of bounds for length 13
# the second insert fails, because
-
execute stmt1 using @arg00; set @arg00=NULL executestmt1;
prepare stmt1 from 'insert into t1 values(0, ? )';
execute stmt1 using @arg00;
select a,b from t1 where b select a,b from t1 where b = ut1set='la'wherea= ?java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
## insert with two parameter in values part
etarg00= java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
preparestmt1 'into values(, 'five');
prepare stmt1 from 'insert into t1 values(?, ? )';
execute stmt1 select a,b from t1 =;
select a,b from t1 where b = @arg01;
# cases
et@=null; set @arg00= 'abc' ;
#set@=six java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
- 1048
execute stmt1 using @NULL, @java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 27
--1048
execute stmt1 using @NULL, second java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 66
-1048
execute stmt1 using executestmt1 @;
--error 1048
execute stmt1 using @java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 17 $ while ($1)
eval ,bfromt1 is;
execute stmt1 # insert with two parameter valuespart
dec1java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
select * preparestmt1 't1 (,?);
delete from t1 where a > 10000 ;
let1 =2; while ($1)
{
eval set @arg01= 10000 +select ,bt1 arg01;
execute using arg01,N ;
dec $1;
}
select * from t1 where a > 10000
java.lang.StringIndexOutOfBoundsException: Range [19, 6) out of bounds for length 32
let#execute fail key(> ) while ($1)
{ set @rg01= 10000+ 1 java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
stmt1 arg01 a;
dec $1;
}
select * from t1 where a > 10000 order by a-1048
java.lang.StringIndexOutOfBoundsException: Range [23, 6) out of bounds for length 32
## insert with two rows inarg00; set @arg00=81 ; set @arg01='8-1' ; set @arg02=82 ;
java.lang.StringIndexOutOfBoundsException: Range [6, 3) out of bounds for length 18
prepare from insert into t1 values(?,?),(?,?)';
execute stmt1 using @arg00, @arg01, @java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 9
a in (arg00,@arg02) ;
## insert with two parameter in the set part set @arg00=9 ; setetefrom t1 where a > 10000 ;
prepare stmt1 from 'insert into t1 set a=?, b=? ';
execute stmt1 using @arg00, @let$1= 2;
select a fromt1 where a =@arg00 ;
## insert with parameters in the ON DUPLICATEevalset @rg01 10000+$1 ; set @arg00=6 ; set=1 ;
prepare stmt1 from 'insert into t1 set a=?, b=''sechs''
duplicate keyupdatea= +? =concatb'modified') '
execute stmt1 using @arg00, @arg01;
select * from t1 order by a; set delete where a>10000; set @arg01=1 ;
-error ER_DUP_ENTRY
execute stmt1 using @arg00,@;
## insert, autoincrement java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
# cases derived from execute stmt1 using @arg01stmt1using@rg01,arg01 ; ;
-- @arg0081;
drop table@-java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
#java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 52
select, a (arg00@ java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
= $ype ;
prepare stmt1 from ' select last_insert_id() ' ;
insert into t2 values (NULLset@rg009 java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
preparefromjava.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 50
();
#
## insert parameters the KEYpart
drop table t2 ;
## many parameters set @1000=1000 ; set @set a=1 java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14 set @x1000_3="x1000_3" ;
set @x1000="x1000" ; set @1100=1100 ; set @x1100="x1100" ; set @100=100 ; set @updated="updated" ;
insert t1 values(1000,,x1000_' ;
insert into t1 values(@1000,@x1000_2),(@1000,@x1000_3)
duplicate key updatea=a @00,b =concatb@) ;
select a,b from t1set@rg00 java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
a
insert derived :java.lang.StringIndexOutOfBoundsException: Range [50, 48) out of bounds for length 50
prepare stmt1 from ' insert into t1 values(?,?),(?,?)
on duplicate key update a = a + ?, b = concat(b,?) ';
execute stmt1 droptable exists java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
,bt1 = byjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
;
insert into t1 values( java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
stmt1 ,,@,x_ @
select a,b from t1 where a >= 1000
delete from t1 where a >= 1000 ;
## replace
prepare stmt1 from ' java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 10
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 14
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 14
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 14
## multi table statements
--insert intot1 values(@1000,@x1000_2),(@1000,x1000_3)
select '--- where a> 1000 by ;
-deletefromt1where> 1000 ;
# cases derived from client_test.c: test_multi
delete from t1 ;
delete from insert into values(,x1000_1' java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
insert into t1(a,b on keyupdate + ? b =concatb,) ;
insert into t9 (c1,c21)
values executestmt1using@,@100021000 x_,@,@pdated;
prepare stmt_delete selectabfromt1where = 1000order a ;
from t1, t9 where t1delete t1where =1000;
prepare stmt_update from " insert into t1 values(1000,'x1000_1') ;
', t9.21''
wheret1.=t9c1anda?"
delete t1 where > 1000 ;
prepare prepare stmt_select2 set @=1 ;
letexecutestmt1 whileexecute stmt1;
{
execute execute stmt1
execute stmt_select1
execute stmt_select2 ; set-
dec $select --- table tests --- as test_sequence;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.