drop table if exists t5, t6, t7, t8;
drop database if exists mysqltest ;
drop database if exists client_test_db;
drop database if exists testtets;
drop table if exists t1Aa,t2Aa,v1Aa,v2Aa;
drop view if exists t1Aa,t2Aa,v1Aa,v2Aa;
test_sequence
------ basic tests ------
drop table if exists t1, t9 ;
create table t1
(
a int, b varchar(30),
primary key(a)
) engine = 'MYISAM';
create table t9
(
c1 tinyint, c2 smallint, c3 mediumint, c4 int,
c5 integer, c6 bigint, c7 float, c8 double,
c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4),
c13 date, c14 datetime, c15 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP, c16 time,
c17 year, c18 tinyint, c19 bool, c20 char,
c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext,
c25 blob, c26 text, c27 mediumblob, c28 mediumtext,
c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'),
c32 set('monday', 'tuesday', 'wednesday'),
primary key(c1)
) engine = 'MYISAM';
delete from t1 ;
insert into t1 values (1,'one');
insert into t1 values (2,'two');
insert into t1 values (3,'three');
insert into t1 values (4,'four');
commit ;
delete from t9 ;
insert into t9 set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1,
c10= 1, c11= 1, c12 = 1,
c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
c16= '11:11:11', c17= '2004',
c18= 1, c19=true, c20= 'a', c21= '123456789a',
c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday';
insert into t9 set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9,
c10= 9, c11= 9, c12 = 9,
c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11',
c16= '11:11:11', c17= '2004',
c18= 1, c19=false, c20= 'a', c21= '123456789a',
c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext',
c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext',
c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday';
commit ;
PREPARE stmt FROM ' select * from t1 where a = ? '; SET @var= 2;
EXECUTE stmt USING @var ;
a b 2 two
select * from t1 where a = @var ;
a b 2 two
DEALLOCATE PREPARE stmt ;
prepare stmt1 from ' select 1 as my_col ';
prepare stmt1 from ' select ? as my_col ';
prepare ; ERROR42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
prepare stmt1 ; ERROR42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
prepare stmt1 from ; ERROR42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
prepare_garbage stmt1 from ' select 1 '; ERROR42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'prepare_garbage stmt1 from ' select 1 '' at line 1
prepare stmt1 from_garbage ' select 1 '; ERROR42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'from_garbage ' select 1 '' at line 1
prepare stmt1 from ' select_garbage 1 '; ERROR42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'select_garbage 1' at line 1
prepare from ' select 1 '; ERROR42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'from ' select 1 '' at line 1
prepare stmt1 ' select 1 '; ERROR42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' select 1 '' at line 1
prepare ? from ' select ? as my_col '; ERROR42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '? from ' select ? as my_col '' at line 1 set @arg00='select 1 as my_col';
prepare stmt1 from @arg00; set @arg00='';
prepare stmt1 from @arg00; ERROR42000: Query was empty set @arg00=NULL;
prepare stmt1 from @arg01; ERROR42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NULL' at line 1
prepare stmt1 from ' select * from t1 where a <= 2 ';
prepare stmt1 from ' select * from t1 where x <= 2 '; ERROR42S22: Unknown column 'x' in 'WHERE'
prepare stmt1 from ' insert into t1(a,x) values(?,?) '; ERROR42S22: Unknown column 'x' in 'INSERT INTO'
prepare stmt1 from ' insert into t1(x,a) values(?,?) '; ERROR42S22: Unknown column 'x' in 'INSERT INTO'
drop table if exists not_exist ;
prepare stmt1 from ' select * from not_exist where a <= 2 '; ERROR42S02: Table 'test.not_exist' doesn't exist
prepare stmt1 from ' insert into t1 values(? '; ERROR42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
prepare stmt1 from ' select a, b from t1
where a=? and where ' ; ERROR42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'where' at line 2
execute never_prepared ; ERROR HY000: Unknown prepared statement handler (never_prepared) given to EXECUTE
prepare stmt1 from ' select * from t1 where a <= 2 ';
prepare stmt1 from ' select * from not_exist where a <= 2 '; ERROR42S02: Table 'test.not_exist' doesn't exist
execute stmt1 ; ERROR HY000: Unknown prepared statement handler (stmt1) given to EXECUTE
create table t5
(
a int primary key,
b char(30),
c int
);
insert into t5( a, b, c) values( 1, 'original table', 1);
prepare stmt2 from ' select * from t5 ';
execute stmt2 ;
a b c 1 original table 1
drop table t5 ;
execute stmt2 ; ERROR42S02: Table 'test.t5' doesn't exist
create table t5
(
a int primary key,
b char(30),
c int
);
insert into t5( a, b, c) values( 9, 'recreated table', 9);
execute stmt2 ;
a b c 9 recreated table 9
drop table t5 ;
create table t5
(
a int primary key,
c int,
b char(30)
);
insert into t5( a, b, c) values( 9, 'recreated table', 9);
execute stmt2 ;
a c b 99 recreated table
drop table t5 ;
create table t5
(
a int primary key,
b char(30),
c int,
d timestamp default '2008-02-23 09:23:45'
);
insert into t5( a, b, c) values( 9, 'recreated table', 9);
execute stmt2 ;
a b c d 9 recreated table 92008-02-2309:23:45
drop table t5 ;
create table t5
(
a int primary key,
d timestamp default '2008-02-23 09:23:45',
b char(30),
c int
);
insert into t5( a, b, c) values( 9, 'recreated table', 9);
execute stmt2 ;
a d b c 92008-02-2309:23:45 recreated table 9
drop table t5 ;
create table t5
(
a timestamp default '2004-02-29 18:01:59',
b char(30),
c int
);
insert into t5( b, c) values( 'recreated table', 9);
execute stmt2 ;
a b c 2004-02-2918:01:59 recreated table 9
drop table t5 ;
create table t5
(
f1 int primary key,
f2 char(30),
f3 int
);
insert into t5( f1, f2, f3) values( 9, 'recreated table', 9);
execute stmt2 ;
f1 f2 f3 9 recreated table 9
drop table t5 ;
prepare stmt1 from ' select * from t1 where a <= 2 ';
execute stmt1 ;
a b 1 one 2 two set @arg00=1; set @arg01='two';
prepare stmt1 from ' select * from t1 where a <= ? ';
execute stmt1 using @arg00;
a b 1 one
execute stmt1 ; ERROR HY000: Incorrect arguments to EXECUTE
execute stmt1 using @arg00, @arg01; ERROR HY000: Incorrect arguments to EXECUTE
execute stmt1 using @not_set;
a b
deallocate prepare never_prepared ; ERROR HY000: Unknown prepared statement handler (never_prepared) given to DEALLOCATE PREPARE
prepare stmt1 from ' select * from t1 where a <= 2 ';
prepare stmt1 from ' select * from not_exist where a <= 2 '; ERROR42S02: Table 'test.not_exist' doesn't exist
deallocate prepare stmt1; ERROR HY000: Unknown prepared statement handler (stmt1) given to DEALLOCATE PREPARE
create table t5
(
a int primary key,
b char(10)
);
prepare stmt2 from ' select a,b from t5 where a <= 2 ';
drop table t5 ;
deallocate prepare stmt2;
prepare stmt1 from ' select a from t1 where a <= 2 ';
prepare stmt2 from ' select b from t1 where a <= 2 ';
execute stmt2 ;
b
one
two
execute stmt1 ;
a 1 2
prepare stmt1 from ' select a from t1 where a <= 2 ';
prepare stmt2 from ' select a from t1 where a <= 2 ';
execute stmt2 ;
a 1 2
execute stmt1 ;
a 1 2
deallocate prepare stmt1 ;
execute stmt2 ;
a 1 2
test_sequence
------ show and misc tests ------
drop table if exists t2;
create table t2
(
a int primary key, b char(10)
);
prepare stmt4 from ' show databases ';
execute stmt4;
Database
information_schema
mtr
mysql
performance_schema
sys
test
prepare stmt4 from ' show tables from test like ''t2%'' ';
execute stmt4;
Tables_in_test (t2%)
t2
prepare stmt4 from ' show columns from t2 where field in (select ?) '; SET @arg00="a";
execute stmt4 using @arg00;
Field Type Null Key Default Extra
a int(11) NO PRI NULL SET @arg00="b";
execute stmt4 using @arg00;
Field Type Null Key Default Extra
b char(10) YES NULL SET @arg00=1;
execute stmt4 using @arg00;
Field Type Null Key Default Extra
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
prepare stmt4 from ' show columns from t2 from test like ''a%'' ';
execute stmt4;
Field Type Null Key Default Extra
a int(11) NO PRI NULL
create index t2_idx on t2(b);
prepare stmt4 from ' show index from t2 from test ';
execute stmt4;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored
t2 0 PRIMARY 1 a A 0 NULL NULL BTREE NO
t2 1 t2_idx 1 b A NULL NULL NULL YES BTREE NO
prepare stmt4 from ' show table status from test like ''t2%'' ';
execute stmt4;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
t2 MyISAM 10 Fixed 000 # 10240 NULL # # # utf8mb4_uca1400_ai_ci NULL # N
prepare stmt4 from ' show table status from test like ''t9%'' ';
execute stmt4;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
t9 MyISAM 10 Dynamic 2214428 # 20480 NULL # # # utf8mb4_uca1400_ai_ci NULL # N
prepare stmt4 from ' show status like ''Threads_running'' ';
execute stmt4;
Variable_name Value
Threads_running #
prepare stmt4 from ' show variables like ''sql_mode'' ';
execute stmt4;
Variable_name Value
sql_mode STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
prepare stmt4 from ' show engine myisam logs ';
execute stmt4;
Type Name Status
prepare stmt4 from ' show grants for user ';
prepare stmt4 from ' show create table t2 ';
prepare stmt4 from ' show master status ';
prepare stmt4 from ' show master logs ';
prepare stmt4 from ' show slave status ';
prepare stmt4 from ' show warnings limit 20 ';
prepare stmt4 from ' show errors limit 20 ';
prepare stmt4 from ' show storage engines ';
execute stmt4;
drop table if exists t5;
prepare stmt1 from ' drop table if exists t5 ';
execute stmt1 ;
Warnings:
Note 1051 Unknown table 'test.t5'
prepare stmt1 from ' drop table t5 ';
execute stmt1 ; ERROR42S02: Unknown table 'test.t5'
prepare stmt1 from ' SELECT @@version ';
execute stmt1 ;
@@version
<version>
prepare stmt_do from ' do @var:= (1 in (select a from t1)) ';
prepare stmt_set from ' set @var= (1 in (select a from t1)) ';
execute stmt_do ;
content of @var is: 1
execute stmt_set ;
content of @var is: 1
execute stmt_do ;
content of @var is: 1
execute stmt_set ;
content of @var is: 1
execute stmt_do ;
content of @var is: 1
execute stmt_set ;
content of @var is: 1
drop table if exists t5 ;
create table t5 (a int) ;
prepare stmt_do from ' do @var:= (1 in (select a from t5)) ';
prepare stmt_set from ' set @var= (1 in (select a from t5)) ';
execute stmt_do ;
content of @var is: 0
execute stmt_set ;
content of @var is: 0
execute stmt_do ;
content of @var is: 0
execute stmt_set ;
content of @var is: 0
execute stmt_do ;
content of @var is: 0
execute stmt_set ;
content of @var is: 0
drop table t5 ;
deallocate prepare stmt_do ;
deallocate prepare stmt_set ;
prepare stmt1 from ' prepare stmt2 from '' select 1 '' '; ERROR HY000: This command is not supported in the prepared statement protocol yet
prepare stmt1 from ' execute stmt2 '; ERROR HY000: This command is not supported in the prepared statement protocol yet
prepare stmt1 from ' deallocate prepare never_prepared '; ERROR HY000: This command is not supported in the prepared statement protocol yet
prepare stmt1 from 'alter view v1 as select 2';
prepare stmt4 from ' use test ';
prepare stmt3 from ' create database mysqltest ';
create database mysqltest ;
prepare stmt3 from ' drop database mysqltest ';
drop database mysqltest ;
prepare stmt3 from ' describe t2 ';
execute stmt3;
Field Type Null Key Default Extra
a int(11) NO PRI NULL
b char(10) YES MUL NULL
drop table t2 ;
execute stmt3; ERROR42S02: Table 'test.t2' doesn't exist
prepare stmt3 from ' lock tables t1 read ';
prepare stmt3 from ' unlock tables ';
prepare stmt1 from ' load data infile ''<MYSQLTEST_VARDIR>/tmp/data.txt''
into table t1 fields terminated by ''\t''';
prepare stmt1 from ' select * into outfile ''<MYSQLTEST_VARDIR>/tmp/data.txt'' from t1 ';
execute stmt1 ;
prepare stmt1 from ' optimize table t1 ';
prepare stmt1 from ' analyze table t1 ';
prepare stmt1 from ' checksum table t1 ';
prepare stmt1 from ' repair table t1 ';
prepare stmt1 from ' handler t1 open ';
prepare stmt3 from ' commit ';
prepare stmt3 from ' rollback ';
prepare stmt4 from ' SET sql_mode=ansi ';
execute stmt4;
select 'a' || 'b'; 'a' || 'b'
ab
prepare stmt4 from ' SET sql_mode="" ';
execute stmt4;
select '2' || '3'; '2' || '3' 1
prepare stmt5 from ' select ''2'' || ''3'' ';
execute stmt5; '2' || '3' 1 SET sql_mode=ansi;
execute stmt5; '2' || '3' 1 SET sql_mode="";
prepare stmt1 from ' flush local privileges ';
prepare stmt1 from ' reset query cache ';
prepare stmt1 from ' KILL 0 ';
prepare stmt1 from ' explain select a from t1 order by b ';
execute stmt1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def id 831 Y 32928063
def select_type 253196 N 1398
def table 253642 Y 0398
def type 253103 Y 0398
def possible_keys 2534_OR_8_K 0 Y 0398
def key 253640 Y 0398
def key_len 2534_OR_8_K 0 Y 0398
def ref 25320480 Y 0398
def rows 253641 Y 0398
def Extra 25325514 N 1398
id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using filesort SET @arg00=1;
prepare stmt1 from ' explain select a from t1 force index (primary) where a > ? order by b ';
execute stmt1 using @arg00;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def id 831 Y 32928063
def select_type 253196 N 1398
def table 253642 Y 0398
def type 253105 Y 0398
def possible_keys 2534_OR_8_K 7 Y 0398
def key 253647 Y 0398
def key_len 2534_OR_8_K 1 Y 0398
def ref 25320480 Y 0398
def rows 253641 Y 0398
def Extra 25325537 N 1398
id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using index condition; Using filesort
drop table if exists t2;
create table t2 (id smallint, name varchar(20)) ;
prepare stmt1 from ' insert into t2 values(?, ?) '; set @id= 9876; set @arg00= 'MySQL - Open Source Database'; set @arg01= "'"; set @arg02= '"'; set @arg03= "my'sql'"; set @arg04= 'my"sql"';
insert into t2 values ( @id , @arg00 );
Warnings:
Warning 1265 Data truncated for column 'name' at row 1
insert into t2 values ( @id , @arg01 );
insert into t2 values ( @id , @arg02 );
insert into t2 values ( @id , @arg03 );
insert into t2 values ( @id , @arg04 );
prepare stmt1 from ' select * from t2 where id= ? and name= ? ';
execute stmt1 using @id, @arg00 ;
id name
execute stmt1 using @id, @arg01 ;
id name 9876'
execute stmt1 using @id, @arg02 ;
id name 9876"
execute stmt1 using @id, @arg03 ;
id name 9876 my'sql'
execute stmt1 using @id, @arg04 ;
id name 9876 my"sql"
drop table t2;
test_sequence
------ create/drop/alter/rename tests ------
drop table if exists t2, t3;
prepare stmt_drop from ' drop table if exists t2 ';
execute stmt_drop;
prepare stmt_create from ' create table t2 (
a int primary key, b char(10)) ';
execute stmt_create;
prepare stmt3 from ' create table t3 like t2 ';
execute stmt3;
drop table t3; set @arg00=1;
prepare stmt3 from ' create table t3 (m int) select ? as m ';
execute stmt3 using @arg00;
select m from t3;
m 1
drop table t3;
prepare stmt3 from ' create index t2_idx on t2(b) ';
prepare stmt3 from ' drop index t2_idx on t2 ';
prepare stmt3 from ' alter table t2 drop primary key ';
drop table if exists new_t2;
prepare stmt3 from ' rename table t2 to new_t2 ';
execute stmt3;
execute stmt3; ERROR42S02: Table 'test.t2' doesn't exist
create table t2 like new_t2;
execute stmt3; ERROR42S01: Table 'new_t2' already exists
drop table new_t2,t2;
prepare stmt1 from ' rename table t5 to t6, t7 to t8 ';
create table t5 (a int) ;
execute stmt1 ; ERROR42S02: Table 'test.t7' doesn't exist
create table t7 (a int) ;
execute stmt1 ;
execute stmt1 ; ERROR42S02: Table 'test.t5' doesn't exist
rename table t6 to t5, t8 to t7 ;
execute stmt1 ;
drop table t6, t8 ;
test_sequence
------ big statement tests ------
(select 'ABC' as my_const_col from t1 where 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1 ) ;
my_const_col
ABC
ABC
ABC
ABC
prepare stmt1 from "select 'ABC' as my_const_col from t1 where 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1AND 1 = 1" ;
execute stmt1 ;
my_const_col
ABC
ABC
ABC
ABC
execute stmt1 ;
my_const_col
ABC
ABC
ABC
ABC
(select 'ABC' as my_const_col FROM t1 WHERE '1234567890123456789012345678901234567890123456789012345678901234567890'
= '1234567890123456789012345678901234567890123456789012345678901234567890'AND '1234567890123456789012345678901234567890123456789012345678901234567890'
= '1234567890123456789012345678901234567890123456789012345678901234567890'AND '1234567890123456789012345678901234567890123456789012345678901234567890'
= '1234567890123456789012345678901234567890123456789012345678901234567890'AND '1234567890123456789012345678901234567890123456789012345678901234567890'
= '1234567890123456789012345678901234567890123456789012345678901234567890'AND '1234567890123456789012345678901234567890123456789012345678901234567890'
= '1234567890123456789012345678901234567890123456789012345678901234567890'AND '1234567890123456789012345678901234567890123456789012345678901234567890'
= '1234567890123456789012345678901234567890123456789012345678901234567890'AND '1234567890123456789012345678901234567890123456789012345678901234567890'
= '1234567890123456789012345678901234567890123456789012345678901234567890'AND '1234567890123456789012345678901234567890123456789012345678901234567890'
= '1234567890123456789012345678901234567890123456789012345678901234567890'AND '1234567890123456789012345678901234567890123456789012345678901234567890'
= '1234567890123456789012345678901234567890123456789012345678901234567890' ) ;
my_const_col
ABC
ABC
ABC
ABC
prepare stmt1 from "select 'ABC' as my_const_col FROM t1 WHERE '1234567890123456789012345678901234567890123456789012345678901234567890'
= '1234567890123456789012345678901234567890123456789012345678901234567890'AND '1234567890123456789012345678901234567890123456789012345678901234567890'
= '1234567890123456789012345678901234567890123456789012345678901234567890'AND '1234567890123456789012345678901234567890123456789012345678901234567890'
= '1234567890123456789012345678901234567890123456789012345678901234567890'AND '1234567890123456789012345678901234567890123456789012345678901234567890'
= '1234567890123456789012345678901234567890123456789012345678901234567890'AND '1234567890123456789012345678901234567890123456789012345678901234567890'
= '1234567890123456789012345678901234567890123456789012345678901234567890'AND '1234567890123456789012345678901234567890123456789012345678901234567890'
= '1234567890123456789012345678901234567890123456789012345678901234567890'AND '1234567890123456789012345678901234567890123456789012345678901234567890'
= '1234567890123456789012345678901234567890123456789012345678901234567890'AND '1234567890123456789012345678901234567890123456789012345678901234567890'
= '1234567890123456789012345678901234567890123456789012345678901234567890'AND '1234567890123456789012345678901234567890123456789012345678901234567890'
= '1234567890123456789012345678901234567890123456789012345678901234567890'" ;
execute stmt1 ;
my_const_col
ABC
ABC
ABC
ABC
execute stmt1 ;
my_const_col
ABC
ABC
ABC
ABC
select 'ABC' as my_const_col FROM t1 WHERE
@arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and
@arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and
@arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and
@arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and
@arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and
@arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and @arg00=@arg00 and
@arg00=@arg00 ;
my_const_col
ABC
ABC
ABC
ABC
prepare stmt1 from ' select ''ABC'' as my_const_col FROM t1 WHERE
? = ? and ? = ? and ? = ? and ? = ? and
? = ? and ? = ? and ? = ? and ? = ? and
? = ? and ? = ? and ? = ? and ? = ? and
? = ? and ? = ? and ? = ? and ? = ? and
? = ? and ? = ? and ? = ? and ? = ? and
? = ? and ? = ? and ? = ? and ? = ? and
? = ? ' ;
execute stmt1 using
@arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00;
my_const_col
ABC
ABC
ABC
ABC
execute stmt1 using
@arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07,
@arg10, @arg11, @arg12, @arg13, @arg14, @arg15, @arg16, @arg17,
@arg20, @arg21, @arg22, @arg23, @arg24, @arg25, @arg26, @arg27,
@arg30, @arg31, @arg32, @arg33, @arg34, @arg35, @arg36, @arg37,
@arg40, @arg41, @arg42, @arg43, @arg44, @arg45, @arg46, @arg47,
@arg50, @arg51, @arg52, @arg53, @arg54, @arg55, @arg56, @arg57,
@arg60, @arg61 ;
my_const_col
ABC
ABC
ABC
ABC
drop table if exists t5 ; set @col_num= 1000;
select @string as "";
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.