Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
90bcde83
Commit
90bcde83
authored
Sep 20, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mleich@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/GORDON/MySQL/mysql-4.1/src
parents
7c4eee90
5a53ee4f
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
134 additions
and
133 deletions
+134
-133
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
mysql-test/include/ps_modify.inc
mysql-test/include/ps_modify.inc
+7
-7
mysql-test/include/ps_modify1.inc
mysql-test/include/ps_modify1.inc
+5
-5
mysql-test/r/ps_2myisam.result
mysql-test/r/ps_2myisam.result
+31
-31
mysql-test/r/ps_3innodb.result
mysql-test/r/ps_3innodb.result
+12
-12
mysql-test/r/ps_4heap.result
mysql-test/r/ps_4heap.result
+32
-32
mysql-test/r/ps_5merge.result
mysql-test/r/ps_5merge.result
+34
-34
mysql-test/r/ps_6bdb.result
mysql-test/r/ps_6bdb.result
+12
-12
No files found.
BitKeeper/etc/logging_ok
View file @
90bcde83
...
@@ -102,6 +102,7 @@ miguel@light.local
...
@@ -102,6 +102,7 @@ miguel@light.local
miguel@sartre.local
miguel@sartre.local
mikron@c-fb0ae253.1238-1-64736c10.cust.bredbandsbolaget.se
mikron@c-fb0ae253.1238-1-64736c10.cust.bredbandsbolaget.se
mikron@mikael-ronstr-ms-dator.local
mikron@mikael-ronstr-ms-dator.local
mleich@mysql.com
mmatthew@markslaptop.
mmatthew@markslaptop.
monty@bitch.mysql.fi
monty@bitch.mysql.fi
monty@butch.
monty@butch.
...
...
mysql-test/include/ps_modify.inc
View file @
90bcde83
...
@@ -110,10 +110,10 @@ select a,b from t1 where a=@arg00;
...
@@ -110,10 +110,10 @@ select a,b from t1 where a=@arg00;
set
@
arg00
=
NULL
;
set
@
arg00
=
NULL
;
set
@
arg01
=
2
;
set
@
arg01
=
2
;
execute
stmt1
using
@
arg00
,
@
arg01
;
execute
stmt1
using
@
arg00
,
@
arg01
;
select
a
,
b
from
t1
;
select
a
,
b
from
t1
order
by
a
;
set
@
arg00
=
0
;
set
@
arg00
=
0
;
execute
stmt1
using
@
arg01
,
@
arg00
;
execute
stmt1
using
@
arg01
,
@
arg00
;
select
a
,
b
from
t1
;
select
a
,
b
from
t1
order
by
a
;
## update with subquery and several parameters
## update with subquery and several parameters
set
@
arg00
=
23
;
set
@
arg00
=
23
;
...
@@ -134,7 +134,7 @@ prepare stmt1 from 'update t1 set a=? where b=?
...
@@ -134,7 +134,7 @@ prepare stmt1 from 'update t1 set a=? where b=?
and a not in (select ? from t2
and a not in (select ? from t2
where b = ? or a = ?)'
;
where b = ? or a = ?)'
;
execute
stmt1
using
@
arg04
,
@
arg01
,
@
arg02
,
@
arg03
,
@
arg00
;
execute
stmt1
using
@
arg04
,
@
arg01
,
@
arg02
,
@
arg03
,
@
arg00
;
select
a
,
b
from
t1
;
select
a
,
b
from
t1
order
by
a
;
drop
table
t2
;
drop
table
t2
;
## update with parameters in limit
## update with parameters in limit
...
@@ -202,7 +202,7 @@ set @arg01=1 ;
...
@@ -202,7 +202,7 @@ set @arg01=1 ;
prepare
stmt1
from
'insert into t1 set a=?, b=''sechs''
prepare
stmt1
from
'insert into t1 set a=?, b=''sechs''
on duplicate key update a=a + ?, b=concat(b,''modified'') '
;
on duplicate key update a=a + ?, b=concat(b,''modified'') '
;
execute
stmt1
using
@
arg00
,
@
arg01
;
execute
stmt1
using
@
arg00
,
@
arg01
;
select
*
from
t1
;
select
*
from
t1
order
by
a
;
set
@
arg00
=
81
;
set
@
arg00
=
81
;
set
@
arg01
=
1
;
set
@
arg01
=
1
;
--
error
1062
--
error
1062
...
@@ -221,17 +221,17 @@ set @updated="updated" ;
...
@@ -221,17 +221,17 @@ set @updated="updated" ;
insert
into
t1
values
(
1000
,
'x1000_1'
)
;
insert
into
t1
values
(
1000
,
'x1000_1'
)
;
insert
into
t1
values
(
@
1000
,
@
x1000_2
),(
@
1000
,
@
x1000_3
)
insert
into
t1
values
(
@
1000
,
@
x1000_2
),(
@
1000
,
@
x1000_3
)
on
duplicate
key
update
a
=
a
+
@
100
,
b
=
concat
(
b
,
@
updated
)
;
on
duplicate
key
update
a
=
a
+
@
100
,
b
=
concat
(
b
,
@
updated
)
;
select
a
,
b
from
t1
where
a
>=
1000
;
select
a
,
b
from
t1
where
a
>=
1000
order
by
a
;
delete
from
t1
where
a
>=
1000
;
delete
from
t1
where
a
>=
1000
;
insert
into
t1
values
(
1000
,
'x1000_1'
)
;
insert
into
t1
values
(
1000
,
'x1000_1'
)
;
prepare
stmt1
from
' insert into t1 values(?,?),(?,?)
prepare
stmt1
from
' insert into t1 values(?,?),(?,?)
on duplicate key update a = a + ?, b = concat(b,?) '
;
on duplicate key update a = a + ?, b = concat(b,?) '
;
execute
stmt1
using
@
1000
,
@
x1000_2
,
@
1000
,
@
x1000_3
,
@
100
,
@
updated
;
execute
stmt1
using
@
1000
,
@
x1000_2
,
@
1000
,
@
x1000_3
,
@
100
,
@
updated
;
select
a
,
b
from
t1
where
a
>=
1000
;
select
a
,
b
from
t1
where
a
>=
1000
order
by
a
;
delete
from
t1
where
a
>=
1000
;
delete
from
t1
where
a
>=
1000
;
insert
into
t1
values
(
1000
,
'x1000_1'
)
;
insert
into
t1
values
(
1000
,
'x1000_1'
)
;
execute
stmt1
using
@
1000
,
@
x1000_2
,
@
1100
,
@
x1000_3
,
@
100
,
@
updated
;
execute
stmt1
using
@
1000
,
@
x1000_2
,
@
1100
,
@
x1000_3
,
@
100
,
@
updated
;
select
a
,
b
from
t1
where
a
>=
1000
;
select
a
,
b
from
t1
where
a
>=
1000
order
by
a
;
delete
from
t1
where
a
>=
1000
;
delete
from
t1
where
a
>=
1000
;
## replace
## replace
...
...
mysql-test/include/ps_modify1.inc
View file @
90bcde83
...
@@ -45,19 +45,19 @@
...
@@ -45,19 +45,19 @@
set
@
duplicate
=
'duplicate '
;
set
@
duplicate
=
'duplicate '
;
set
@
1000
=
1000
;
set
@
1000
=
1000
;
set
@
5
=
5
;
set
@
5
=
5
;
select
a
,
b
from
t1
where
a
<
5
;
select
a
,
b
from
t1
where
a
<
5
order
by
a
;
--
enable_info
--
enable_info
insert
into
t1
select
a
+
@
1000
,
concat
(
@
duplicate
,
b
)
from
t1
insert
into
t1
select
a
+
@
1000
,
concat
(
@
duplicate
,
b
)
from
t1
where
a
<
@
5
;
where
a
<
@
5
;
--
disable_info
--
disable_info
select
a
,
b
from
t1
where
a
>=
1000
;
select
a
,
b
from
t1
where
a
>=
1000
order
by
a
;
delete
from
t1
where
a
>=
1000
;
delete
from
t1
where
a
>=
1000
;
prepare
stmt1
from
' insert into t1 select a + ?, concat(?,b) from t1
prepare
stmt1
from
' insert into t1 select a + ?, concat(?,b) from t1
where a < ? '
;
where a < ? '
;
--
enable_info
--
enable_info
execute
stmt1
using
@
1000
,
@
duplicate
,
@
5
;
execute
stmt1
using
@
1000
,
@
duplicate
,
@
5
;
--
disable_info
--
disable_info
select
a
,
b
from
t1
where
a
>=
1000
;
select
a
,
b
from
t1
where
a
>=
1000
order
by
a
;
delete
from
t1
where
a
>=
1000
;
delete
from
t1
where
a
>=
1000
;
set
@
float
=
1.00
;
set
@
float
=
1.00
;
...
@@ -78,7 +78,7 @@ select b, a + @100 from t1
...
@@ -78,7 +78,7 @@ select b, a + @100 from t1
where
(
a
,
b
)
in
(
select
sqrt
(
a
+@
1
)
+
CAST
(
@
float
AS
signed
),
b
where
(
a
,
b
)
in
(
select
sqrt
(
a
+@
1
)
+
CAST
(
@
float
AS
signed
),
b
from
t1
);
from
t1
);
--
disable_info
--
disable_info
select
a
,
b
from
t2
;
select
a
,
b
from
t2
order
by
a
;
delete
from
t2
;
delete
from
t2
;
prepare
stmt1
from
' insert into t2 (b,a)
prepare
stmt1
from
' insert into t2 (b,a)
select ?, sum(first.a)
select ?, sum(first.a)
...
@@ -93,5 +93,5 @@ select b, a + ? from t1
...
@@ -93,5 +93,5 @@ select b, a + ? from t1
--
enable_info
--
enable_info
execute
stmt1
using
@
duplicate
,
@
5
,
@
five
,
@
2
,
@
100
,
@
1
,
@
float
;
execute
stmt1
using
@
duplicate
,
@
5
,
@
five
,
@
2
,
@
100
,
@
1
,
@
float
;
--
disable_info
--
disable_info
select
a
,
b
from
t2
;
select
a
,
b
from
t2
order
by
a
;
drop
table
t2
;
drop
table
t2
;
mysql-test/r/ps_2myisam.result
View file @
90bcde83
...
@@ -1016,15 +1016,15 @@ set @arg01=2;
...
@@ -1016,15 +1016,15 @@ set @arg01=2;
execute stmt1 using @arg00, @arg01;
execute stmt1 using @arg00, @arg01;
Warnings:
Warnings:
Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1
Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1
select a,b from t1;
select a,b from t1
order by a
;
a b
a b
1 one
0 two
0 two
1 one
3 three
3 three
4 four
4 four
set @arg00=0;
set @arg00=0;
execute stmt1 using @arg01, @arg00;
execute stmt1 using @arg01, @arg00;
select a,b from t1;
select a,b from t1
order by a
;
a b
a b
1 one
1 one
2 two
2 two
...
@@ -1048,7 +1048,7 @@ prepare stmt1 from 'update t1 set a=? where b=?
...
@@ -1048,7 +1048,7 @@ prepare stmt1 from 'update t1 set a=? where b=?
and a not in (select ? from t2
and a not in (select ? from t2
where b = ? or a = ?)';
where b = ? or a = ?)';
execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ;
execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ;
select a,b from t1 ;
select a,b from t1
order by a
;
a b
a b
1 one
1 one
2 two
2 two
...
@@ -1142,19 +1142,19 @@ set @arg01=1 ;
...
@@ -1142,19 +1142,19 @@ set @arg01=1 ;
prepare stmt1 from 'insert into t1 set a=?, b=''sechs''
prepare stmt1 from 'insert into t1 set a=?, b=''sechs''
on duplicate key update a=a + ?, b=concat(b,''modified'') ';
on duplicate key update a=a + ?, b=concat(b,''modified'') ';
execute stmt1 using @arg00, @arg01;
execute stmt1 using @arg00, @arg01;
select * from t1;
select * from t1
order by a
;
a b
a b
0 NULL
1 one
1 one
2 two
2 two
3 three
3 three
4 four
4 four
5 five
5 five
7 sixmodified
7 sixmodified
0 NULL
8 eight
8 eight
9 nine
81 8-1
81 8-1
82 8-2
82 8-2
9 nine
set @arg00=81 ;
set @arg00=81 ;
set @arg01=1 ;
set @arg01=1 ;
execute stmt1 using @arg00, @arg01;
execute stmt1 using @arg00, @arg01;
...
@@ -1170,7 +1170,7 @@ set @updated="updated" ;
...
@@ -1170,7 +1170,7 @@ set @updated="updated" ;
insert into t1 values(1000,'x1000_1') ;
insert into t1 values(1000,'x1000_1') ;
insert into t1 values(@1000,@x1000_2),(@1000,@x1000_3)
insert into t1 values(@1000,@x1000_2),(@1000,@x1000_3)
on duplicate key update a = a + @100, b = concat(b,@updated) ;
on duplicate key update a = a + @100, b = concat(b,@updated) ;
select a,b from t1 where a >= 1000 ;
select a,b from t1 where a >= 1000
order by a
;
a b
a b
1000 x1000_3
1000 x1000_3
1100 x1000_1updated
1100 x1000_1updated
...
@@ -1179,14 +1179,14 @@ insert into t1 values(1000,'x1000_1') ;
...
@@ -1179,14 +1179,14 @@ insert into t1 values(1000,'x1000_1') ;
prepare stmt1 from ' insert into t1 values(?,?),(?,?)
prepare stmt1 from ' insert into t1 values(?,?),(?,?)
on duplicate key update a = a + ?, b = concat(b,?) ';
on duplicate key update a = a + ?, b = concat(b,?) ';
execute stmt1 using @1000, @x1000_2, @1000, @x1000_3, @100, @updated ;
execute stmt1 using @1000, @x1000_2, @1000, @x1000_3, @100, @updated ;
select a,b from t1 where a >= 1000 ;
select a,b from t1 where a >= 1000
order by a
;
a b
a b
1000 x1000_3
1000 x1000_3
1100 x1000_1updated
1100 x1000_1updated
delete from t1 where a >= 1000 ;
delete from t1 where a >= 1000 ;
insert into t1 values(1000,'x1000_1') ;
insert into t1 values(1000,'x1000_1') ;
execute stmt1 using @1000, @x1000_2, @1100, @x1000_3, @100, @updated ;
execute stmt1 using @1000, @x1000_2, @1100, @x1000_3, @100, @updated ;
select a,b from t1 where a >= 1000 ;
select a,b from t1 where a >= 1000
order by a
;
a b
a b
1200 x1000_1updatedupdated
1200 x1000_1updatedupdated
delete from t1 where a >= 1000 ;
delete from t1 where a >= 1000 ;
...
@@ -1195,37 +1195,37 @@ ERROR HY000: This command is not supported in the prepared statement protocol ye
...
@@ -1195,37 +1195,37 @@ ERROR HY000: This command is not supported in the prepared statement protocol ye
set @duplicate='duplicate ' ;
set @duplicate='duplicate ' ;
set @1000=1000 ;
set @1000=1000 ;
set @5=5 ;
set @5=5 ;
select a,b from t1 where a < 5 ;
select a,b from t1 where a < 5
order by a
;
a b
a b
0 NULL
1 one
1 one
2 two
2 two
3 three
3 three
4 four
4 four
0 NULL
insert into t1 select a + @1000, concat(@duplicate,b) from t1
insert into t1 select a + @1000, concat(@duplicate,b) from t1
where a < @5 ;
where a < @5 ;
affected rows: 5
affected rows: 5
info: Records: 5 Duplicates: 0 Warnings: 0
info: Records: 5 Duplicates: 0 Warnings: 0
select a,b from t1 where a >= 1000 ;
select a,b from t1 where a >= 1000
order by a
;
a b
a b
1000 NULL
1001 duplicate one
1001 duplicate one
1002 duplicate two
1002 duplicate two
1003 duplicate three
1003 duplicate three
1004 duplicate four
1004 duplicate four
1000 NULL
delete from t1 where a >= 1000 ;
delete from t1 where a >= 1000 ;
prepare stmt1 from ' insert into t1 select a + ?, concat(?,b) from t1
prepare stmt1 from ' insert into t1 select a + ?, concat(?,b) from t1
where a < ? ' ;
where a < ? ' ;
execute stmt1 using @1000, @duplicate, @5;
execute stmt1 using @1000, @duplicate, @5;
affected rows: 5
affected rows: 5
info: Records: 5 Duplicates: 0 Warnings: 0
info: Records: 5 Duplicates: 0 Warnings: 0
select a,b from t1 where a >= 1000 ;
select a,b from t1 where a >= 1000
order by a
;
a b
a b
1004 duplicate four
1003 duplicate three
1002 duplicate two
1001 duplicate one
1000 NULL
1000 NULL
1001 duplicate one
1002 duplicate two
1003 duplicate three
1004 duplicate four
delete from t1 where a >= 1000 ;
delete from t1 where a >= 1000 ;
set @float=1.00;
set @float=1.00;
set @five='five' ;
set @five='five' ;
...
@@ -1243,15 +1243,15 @@ where (a,b) in ( select sqrt(a+@1)+CAST(@float AS signed),b
...
@@ -1243,15 +1243,15 @@ where (a,b) in ( select sqrt(a+@1)+CAST(@float AS signed),b
from t1);
from t1);
affected rows: 8
affected rows: 8
info: Records: 8 Duplicates: 0 Warnings: 0
info: Records: 8 Duplicates: 0 Warnings: 0
select a,b from t2;
select a,b from t2
order by a
;
a b
a b
81 duplicate
3 duplicate
82 duplicate
8 duplicate
4 duplicate
4 duplicate
9 duplicate
7 duplicate
7 duplicate
3 duplicate
8 duplicate
9 duplicate
81 duplicate
82 duplicate
103 three
103 three
delete from t2 ;
delete from t2 ;
prepare stmt1 from ' insert into t2 (b,a)
prepare stmt1 from ' insert into t2 (b,a)
...
@@ -1267,15 +1267,15 @@ select b, a + ? from t1
...
@@ -1267,15 +1267,15 @@ select b, a + ? from t1
execute stmt1 using @duplicate, @5, @five, @2, @100, @1, @float ;
execute stmt1 using @duplicate, @5, @five, @2, @100, @1, @float ;
affected rows: 8
affected rows: 8
info: Records: 8 Duplicates: 0 Warnings: 0
info: Records: 8 Duplicates: 0 Warnings: 0
select a,b from t2;
select a,b from t2
order by a
;
a b
a b
81 duplicate
3 duplicate
82 duplicate
8 duplicate
4 duplicate
4 duplicate
9 duplicate
7 duplicate
7 duplicate
3 duplicate
8 duplicate
9 duplicate
81 duplicate
82 duplicate
103 three
103 three
drop table t2;
drop table t2;
drop table t1, t_many_col_types;
drop table t1, t_many_col_types;
mysql-test/r/ps_3innodb.result
View file @
90bcde83
...
@@ -1016,7 +1016,7 @@ set @arg01=2;
...
@@ -1016,7 +1016,7 @@ set @arg01=2;
execute stmt1 using @arg00, @arg01;
execute stmt1 using @arg00, @arg01;
Warnings:
Warnings:
Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1
Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1
select a,b from t1;
select a,b from t1
order by a
;
a b
a b
0 two
0 two
1 one
1 one
...
@@ -1024,7 +1024,7 @@ a b
...
@@ -1024,7 +1024,7 @@ a b
4 four
4 four
set @arg00=0;
set @arg00=0;
execute stmt1 using @arg01, @arg00;
execute stmt1 using @arg01, @arg00;
select a,b from t1;
select a,b from t1
order by a
;
a b
a b
1 one
1 one
2 two
2 two
...
@@ -1048,7 +1048,7 @@ prepare stmt1 from 'update t1 set a=? where b=?
...
@@ -1048,7 +1048,7 @@ prepare stmt1 from 'update t1 set a=? where b=?
and a not in (select ? from t2
and a not in (select ? from t2
where b = ? or a = ?)';
where b = ? or a = ?)';
execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ;
execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ;
select a,b from t1 ;
select a,b from t1
order by a
;
a b
a b
1 one
1 one
2 two
2 two
...
@@ -1142,7 +1142,7 @@ set @arg01=1 ;
...
@@ -1142,7 +1142,7 @@ set @arg01=1 ;
prepare stmt1 from 'insert into t1 set a=?, b=''sechs''
prepare stmt1 from 'insert into t1 set a=?, b=''sechs''
on duplicate key update a=a + ?, b=concat(b,''modified'') ';
on duplicate key update a=a + ?, b=concat(b,''modified'') ';
execute stmt1 using @arg00, @arg01;
execute stmt1 using @arg00, @arg01;
select * from t1;
select * from t1
order by a
;
a b
a b
0 NULL
0 NULL
1 one
1 one
...
@@ -1170,7 +1170,7 @@ set @updated="updated" ;
...
@@ -1170,7 +1170,7 @@ set @updated="updated" ;
insert into t1 values(1000,'x1000_1') ;
insert into t1 values(1000,'x1000_1') ;
insert into t1 values(@1000,@x1000_2),(@1000,@x1000_3)
insert into t1 values(@1000,@x1000_2),(@1000,@x1000_3)
on duplicate key update a = a + @100, b = concat(b,@updated) ;
on duplicate key update a = a + @100, b = concat(b,@updated) ;
select a,b from t1 where a >= 1000 ;
select a,b from t1 where a >= 1000
order by a
;
a b
a b
1000 x1000_3
1000 x1000_3
1100 x1000_1updated
1100 x1000_1updated
...
@@ -1179,14 +1179,14 @@ insert into t1 values(1000,'x1000_1') ;
...
@@ -1179,14 +1179,14 @@ insert into t1 values(1000,'x1000_1') ;
prepare stmt1 from ' insert into t1 values(?,?),(?,?)
prepare stmt1 from ' insert into t1 values(?,?),(?,?)
on duplicate key update a = a + ?, b = concat(b,?) ';
on duplicate key update a = a + ?, b = concat(b,?) ';
execute stmt1 using @1000, @x1000_2, @1000, @x1000_3, @100, @updated ;
execute stmt1 using @1000, @x1000_2, @1000, @x1000_3, @100, @updated ;
select a,b from t1 where a >= 1000 ;
select a,b from t1 where a >= 1000
order by a
;
a b
a b
1000 x1000_3
1000 x1000_3
1100 x1000_1updated
1100 x1000_1updated
delete from t1 where a >= 1000 ;
delete from t1 where a >= 1000 ;
insert into t1 values(1000,'x1000_1') ;
insert into t1 values(1000,'x1000_1') ;
execute stmt1 using @1000, @x1000_2, @1100, @x1000_3, @100, @updated ;
execute stmt1 using @1000, @x1000_2, @1100, @x1000_3, @100, @updated ;
select a,b from t1 where a >= 1000 ;
select a,b from t1 where a >= 1000
order by a
;
a b
a b
1200 x1000_1updatedupdated
1200 x1000_1updatedupdated
delete from t1 where a >= 1000 ;
delete from t1 where a >= 1000 ;
...
@@ -1195,7 +1195,7 @@ ERROR HY000: This command is not supported in the prepared statement protocol ye
...
@@ -1195,7 +1195,7 @@ ERROR HY000: This command is not supported in the prepared statement protocol ye
set @duplicate='duplicate ' ;
set @duplicate='duplicate ' ;
set @1000=1000 ;
set @1000=1000 ;
set @5=5 ;
set @5=5 ;
select a,b from t1 where a < 5 ;
select a,b from t1 where a < 5
order by a
;
a b
a b
0 NULL
0 NULL
1 one
1 one
...
@@ -1206,7 +1206,7 @@ insert into t1 select a + @1000, concat(@duplicate,b) from t1
...
@@ -1206,7 +1206,7 @@ insert into t1 select a + @1000, concat(@duplicate,b) from t1
where a < @5 ;
where a < @5 ;
affected rows: 5
affected rows: 5
info: Records: 5 Duplicates: 0 Warnings: 0
info: Records: 5 Duplicates: 0 Warnings: 0
select a,b from t1 where a >= 1000 ;
select a,b from t1 where a >= 1000
order by a
;
a b
a b
1000 NULL
1000 NULL
1001 duplicate one
1001 duplicate one
...
@@ -1219,7 +1219,7 @@ where a < ? ' ;
...
@@ -1219,7 +1219,7 @@ where a < ? ' ;
execute stmt1 using @1000, @duplicate, @5;
execute stmt1 using @1000, @duplicate, @5;
affected rows: 5
affected rows: 5
info: Records: 5 Duplicates: 0 Warnings: 0
info: Records: 5 Duplicates: 0 Warnings: 0
select a,b from t1 where a >= 1000 ;
select a,b from t1 where a >= 1000
order by a
;
a b
a b
1000 NULL
1000 NULL
1001 duplicate one
1001 duplicate one
...
@@ -1243,7 +1243,7 @@ where (a,b) in ( select sqrt(a+@1)+CAST(@float AS signed),b
...
@@ -1243,7 +1243,7 @@ where (a,b) in ( select sqrt(a+@1)+CAST(@float AS signed),b
from t1);
from t1);
affected rows: 8
affected rows: 8
info: Records: 8 Duplicates: 0 Warnings: 0
info: Records: 8 Duplicates: 0 Warnings: 0
select a,b from t2;
select a,b from t2
order by a
;
a b
a b
3 duplicate
3 duplicate
4 duplicate
4 duplicate
...
@@ -1267,7 +1267,7 @@ select b, a + ? from t1
...
@@ -1267,7 +1267,7 @@ select b, a + ? from t1
execute stmt1 using @duplicate, @5, @five, @2, @100, @1, @float ;
execute stmt1 using @duplicate, @5, @five, @2, @100, @1, @float ;
affected rows: 8
affected rows: 8
info: Records: 8 Duplicates: 0 Warnings: 0
info: Records: 8 Duplicates: 0 Warnings: 0
select a,b from t2;
select a,b from t2
order by a
;
a b
a b
3 duplicate
3 duplicate
4 duplicate
4 duplicate
...
...
mysql-test/r/ps_4heap.result
View file @
90bcde83
...
@@ -1017,15 +1017,15 @@ set @arg01=2;
...
@@ -1017,15 +1017,15 @@ set @arg01=2;
execute stmt1 using @arg00, @arg01;
execute stmt1 using @arg00, @arg01;
Warnings:
Warnings:
Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1
Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1
select a,b from t1;
select a,b from t1
order by a
;
a b
a b
1 one
0 two
0 two
1 one
3 three
3 three
4 four
4 four
set @arg00=0;
set @arg00=0;
execute stmt1 using @arg01, @arg00;
execute stmt1 using @arg01, @arg00;
select a,b from t1;
select a,b from t1
order by a
;
a b
a b
1 one
1 one
2 two
2 two
...
@@ -1049,7 +1049,7 @@ prepare stmt1 from 'update t1 set a=? where b=?
...
@@ -1049,7 +1049,7 @@ prepare stmt1 from 'update t1 set a=? where b=?
and a not in (select ? from t2
and a not in (select ? from t2
where b = ? or a = ?)';
where b = ? or a = ?)';
execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ;
execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ;
select a,b from t1 ;
select a,b from t1
order by a
;
a b
a b
1 one
1 one
2 two
2 two
...
@@ -1143,19 +1143,19 @@ set @arg01=1 ;
...
@@ -1143,19 +1143,19 @@ set @arg01=1 ;
prepare stmt1 from 'insert into t1 set a=?, b=''sechs''
prepare stmt1 from 'insert into t1 set a=?, b=''sechs''
on duplicate key update a=a + ?, b=concat(b,''modified'') ';
on duplicate key update a=a + ?, b=concat(b,''modified'') ';
execute stmt1 using @arg00, @arg01;
execute stmt1 using @arg00, @arg01;
select * from t1;
select * from t1
order by a
;
a b
a b
0 NULL
1 one
1 one
2 two
2 two
3 three
3 three
4 four
4 four
5 five
5 five
7 sixmodified
7 sixmodified
0 NULL
8 eight
8 eight
9 nine
81 8-1
81 8-1
82 8-2
82 8-2
9 nine
set @arg00=81 ;
set @arg00=81 ;
set @arg01=1 ;
set @arg01=1 ;
execute stmt1 using @arg00, @arg01;
execute stmt1 using @arg00, @arg01;
...
@@ -1171,23 +1171,23 @@ set @updated="updated" ;
...
@@ -1171,23 +1171,23 @@ set @updated="updated" ;
insert into t1 values(1000,'x1000_1') ;
insert into t1 values(1000,'x1000_1') ;
insert into t1 values(@1000,@x1000_2),(@1000,@x1000_3)
insert into t1 values(@1000,@x1000_2),(@1000,@x1000_3)
on duplicate key update a = a + @100, b = concat(b,@updated) ;
on duplicate key update a = a + @100, b = concat(b,@updated) ;
select a,b from t1 where a >= 1000 ;
select a,b from t1 where a >= 1000
order by a
;
a b
a b
1100 x1000_1updated
1000 x1000_3
1000 x1000_3
1100 x1000_1updated
delete from t1 where a >= 1000 ;
delete from t1 where a >= 1000 ;
insert into t1 values(1000,'x1000_1') ;
insert into t1 values(1000,'x1000_1') ;
prepare stmt1 from ' insert into t1 values(?,?),(?,?)
prepare stmt1 from ' insert into t1 values(?,?),(?,?)
on duplicate key update a = a + ?, b = concat(b,?) ';
on duplicate key update a = a + ?, b = concat(b,?) ';
execute stmt1 using @1000, @x1000_2, @1000, @x1000_3, @100, @updated ;
execute stmt1 using @1000, @x1000_2, @1000, @x1000_3, @100, @updated ;
select a,b from t1 where a >= 1000 ;
select a,b from t1 where a >= 1000
order by a
;
a b
a b
1000 x1000_3
1000 x1000_3
1100 x1000_1updated
1100 x1000_1updated
delete from t1 where a >= 1000 ;
delete from t1 where a >= 1000 ;
insert into t1 values(1000,'x1000_1') ;
insert into t1 values(1000,'x1000_1') ;
execute stmt1 using @1000, @x1000_2, @1100, @x1000_3, @100, @updated ;
execute stmt1 using @1000, @x1000_2, @1100, @x1000_3, @100, @updated ;
select a,b from t1 where a >= 1000 ;
select a,b from t1 where a >= 1000
order by a
;
a b
a b
1200 x1000_1updatedupdated
1200 x1000_1updatedupdated
delete from t1 where a >= 1000 ;
delete from t1 where a >= 1000 ;
...
@@ -1196,37 +1196,37 @@ ERROR HY000: This command is not supported in the prepared statement protocol ye
...
@@ -1196,37 +1196,37 @@ ERROR HY000: This command is not supported in the prepared statement protocol ye
set @duplicate='duplicate ' ;
set @duplicate='duplicate ' ;
set @1000=1000 ;
set @1000=1000 ;
set @5=5 ;
set @5=5 ;
select a,b from t1 where a < 5 ;
select a,b from t1 where a < 5
order by a
;
a b
a b
0 NULL
1 one
1 one
2 two
2 two
3 three
3 three
4 four
4 four
0 NULL
insert into t1 select a + @1000, concat(@duplicate,b) from t1
insert into t1 select a + @1000, concat(@duplicate,b) from t1
where a < @5 ;
where a < @5 ;
affected rows: 5
affected rows: 5
info: Records: 5 Duplicates: 0 Warnings: 0
info: Records: 5 Duplicates: 0 Warnings: 0
select a,b from t1 where a >= 1000 ;
select a,b from t1 where a >= 1000
order by a
;
a b
a b
100
2 duplicate two
100
0 NULL
1001 duplicate one
1001 duplicate one
1002 duplicate two
1003 duplicate three
1003 duplicate three
1004 duplicate four
1004 duplicate four
1000 NULL
delete from t1 where a >= 1000 ;
delete from t1 where a >= 1000 ;
prepare stmt1 from ' insert into t1 select a + ?, concat(?,b) from t1
prepare stmt1 from ' insert into t1 select a + ?, concat(?,b) from t1
where a < ? ' ;
where a < ? ' ;
execute stmt1 using @1000, @duplicate, @5;
execute stmt1 using @1000, @duplicate, @5;
affected rows: 5
affected rows: 5
info: Records: 5 Duplicates: 0 Warnings: 0
info: Records: 5 Duplicates: 0 Warnings: 0
select a,b from t1 where a >= 1000 ;
select a,b from t1 where a >= 1000
order by a
;
a b
a b
1000 NULL
1000 NULL
1004 duplicate four
1003 duplicate three
1002 duplicate two
1001 duplicate one
1001 duplicate one
1002 duplicate two
1003 duplicate three
1004 duplicate four
delete from t1 where a >= 1000 ;
delete from t1 where a >= 1000 ;
set @float=1.00;
set @float=1.00;
set @five='five' ;
set @five='five' ;
...
@@ -1244,15 +1244,15 @@ where (a,b) in ( select sqrt(a+@1)+CAST(@float AS signed),b
...
@@ -1244,15 +1244,15 @@ where (a,b) in ( select sqrt(a+@1)+CAST(@float AS signed),b
from t1);
from t1);
affected rows: 8
affected rows: 8
info: Records: 8 Duplicates: 0 Warnings: 0
info: Records: 8 Duplicates: 0 Warnings: 0
select a,b from t2;
select a,b from t2
order by a
;
a b
a b
81 duplicate
3 duplicate
82 duplicate
8 duplicate
4 duplicate
4 duplicate
9 duplicate
7 duplicate
7 duplicate
3 duplicate
8 duplicate
9 duplicate
81 duplicate
82 duplicate
103 three
103 three
delete from t2 ;
delete from t2 ;
prepare stmt1 from ' insert into t2 (b,a)
prepare stmt1 from ' insert into t2 (b,a)
...
@@ -1268,15 +1268,15 @@ select b, a + ? from t1
...
@@ -1268,15 +1268,15 @@ select b, a + ? from t1
execute stmt1 using @duplicate, @5, @five, @2, @100, @1, @float ;
execute stmt1 using @duplicate, @5, @five, @2, @100, @1, @float ;
affected rows: 8
affected rows: 8
info: Records: 8 Duplicates: 0 Warnings: 0
info: Records: 8 Duplicates: 0 Warnings: 0
select a,b from t2;
select a,b from t2
order by a
;
a b
a b
81 duplicate
3 duplicate
82 duplicate
8 duplicate
4 duplicate
4 duplicate
9 duplicate
7 duplicate
7 duplicate
3 duplicate
8 duplicate
9 duplicate
81 duplicate
82 duplicate
103 three
103 three
drop table t2;
drop table t2;
drop table t1, t_many_col_types;
drop table t1, t_many_col_types;
mysql-test/r/ps_5merge.result
View file @
90bcde83
...
@@ -1059,19 +1059,19 @@ set @arg01=2;
...
@@ -1059,19 +1059,19 @@ set @arg01=2;
execute stmt1 using @arg00, @arg01;
execute stmt1 using @arg00, @arg01;
Warnings:
Warnings:
Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1
Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1
select a,b from t1;
select a,b from t1
order by a
;
a b
a b
3 three
0 two
0 two
1 one
1 one
3 three
4 four
4 four
set @arg00=0;
set @arg00=0;
execute stmt1 using @arg01, @arg00;
execute stmt1 using @arg01, @arg00;
select a,b from t1;
select a,b from t1
order by a
;
a b
a b
3 three
2 two
1 one
1 one
2 two
3 three
4 four
4 four
set @arg00=23;
set @arg00=23;
set @arg01='two';
set @arg01='two';
...
@@ -1091,11 +1091,11 @@ prepare stmt1 from 'update t1 set a=? where b=?
...
@@ -1091,11 +1091,11 @@ prepare stmt1 from 'update t1 set a=? where b=?
and a not in (select ? from t2
and a not in (select ? from t2
where b = ? or a = ?)';
where b = ? or a = ?)';
execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ;
execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ;
select a,b from t1 ;
select a,b from t1
order by a
;
a b
a b
3 three
2 two
1 one
1 one
2 two
3 three
4 four
4 four
drop table t2 ;
drop table t2 ;
set @arg00=1;
set @arg00=1;
...
@@ -1185,19 +1185,19 @@ set @arg01=1 ;
...
@@ -1185,19 +1185,19 @@ set @arg01=1 ;
prepare stmt1 from 'insert into t1 set a=?, b=''sechs''
prepare stmt1 from 'insert into t1 set a=?, b=''sechs''
on duplicate key update a=a + ?, b=concat(b,''modified'') ';
on duplicate key update a=a + ?, b=concat(b,''modified'') ';
execute stmt1 using @arg00, @arg01;
execute stmt1 using @arg00, @arg01;
select * from t1;
select * from t1
order by a
;
a b
a b
4 four
0 NULL
3 three
2 two
1 one
1 one
2 two
3 three
4 four
5 five
5 five
7 sixmodified
7 sixmodified
0 NULL
8 eight
8 eight
9 nine
81 8-1
81 8-1
82 8-2
82 8-2
9 nine
set @arg00=81 ;
set @arg00=81 ;
set @arg01=1 ;
set @arg01=1 ;
execute stmt1 using @arg00, @arg01;
execute stmt1 using @arg00, @arg01;
...
@@ -1213,7 +1213,7 @@ set @updated="updated" ;
...
@@ -1213,7 +1213,7 @@ set @updated="updated" ;
insert into t1 values(1000,'x1000_1') ;
insert into t1 values(1000,'x1000_1') ;
insert into t1 values(@1000,@x1000_2),(@1000,@x1000_3)
insert into t1 values(@1000,@x1000_2),(@1000,@x1000_3)
on duplicate key update a = a + @100, b = concat(b,@updated) ;
on duplicate key update a = a + @100, b = concat(b,@updated) ;
select a,b from t1 where a >= 1000 ;
select a,b from t1 where a >= 1000
order by a
;
a b
a b
1000 x1000_3
1000 x1000_3
1100 x1000_1updated
1100 x1000_1updated
...
@@ -1222,14 +1222,14 @@ insert into t1 values(1000,'x1000_1') ;
...
@@ -1222,14 +1222,14 @@ insert into t1 values(1000,'x1000_1') ;
prepare stmt1 from ' insert into t1 values(?,?),(?,?)
prepare stmt1 from ' insert into t1 values(?,?),(?,?)
on duplicate key update a = a + ?, b = concat(b,?) ';
on duplicate key update a = a + ?, b = concat(b,?) ';
execute stmt1 using @1000, @x1000_2, @1000, @x1000_3, @100, @updated ;
execute stmt1 using @1000, @x1000_2, @1000, @x1000_3, @100, @updated ;
select a,b from t1 where a >= 1000 ;
select a,b from t1 where a >= 1000
order by a
;
a b
a b
1000 x1000_3
1000 x1000_3
1100 x1000_1updated
1100 x1000_1updated
delete from t1 where a >= 1000 ;
delete from t1 where a >= 1000 ;
insert into t1 values(1000,'x1000_1') ;
insert into t1 values(1000,'x1000_1') ;
execute stmt1 using @1000, @x1000_2, @1100, @x1000_3, @100, @updated ;
execute stmt1 using @1000, @x1000_2, @1100, @x1000_3, @100, @updated ;
select a,b from t1 where a >= 1000 ;
select a,b from t1 where a >= 1000
order by a
;
a b
a b
1200 x1000_1updatedupdated
1200 x1000_1updatedupdated
delete from t1 where a >= 1000 ;
delete from t1 where a >= 1000 ;
...
@@ -2254,19 +2254,19 @@ set @arg01=2;
...
@@ -2254,19 +2254,19 @@ set @arg01=2;
execute stmt1 using @arg00, @arg01;
execute stmt1 using @arg00, @arg01;
Warnings:
Warnings:
Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1
Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1
select a,b from t1;
select a,b from t1
order by a
;
a b
a b
3 three
0 two
0 two
1 one
1 one
3 three
4 four
4 four
set @arg00=0;
set @arg00=0;
execute stmt1 using @arg01, @arg00;
execute stmt1 using @arg01, @arg00;
select a,b from t1;
select a,b from t1
order by a
;
a b
a b
3 three
2 two
1 one
1 one
2 two
3 three
4 four
4 four
set @arg00=23;
set @arg00=23;
set @arg01='two';
set @arg01='two';
...
@@ -2286,11 +2286,11 @@ prepare stmt1 from 'update t1 set a=? where b=?
...
@@ -2286,11 +2286,11 @@ prepare stmt1 from 'update t1 set a=? where b=?
and a not in (select ? from t2
and a not in (select ? from t2
where b = ? or a = ?)';
where b = ? or a = ?)';
execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ;
execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ;
select a,b from t1 ;
select a,b from t1
order by a
;
a b
a b
3 three
2 two
1 one
1 one
2 two
3 three
4 four
4 four
drop table t2 ;
drop table t2 ;
set @arg00=1;
set @arg00=1;
...
@@ -2380,19 +2380,19 @@ set @arg01=1 ;
...
@@ -2380,19 +2380,19 @@ set @arg01=1 ;
prepare stmt1 from 'insert into t1 set a=?, b=''sechs''
prepare stmt1 from 'insert into t1 set a=?, b=''sechs''
on duplicate key update a=a + ?, b=concat(b,''modified'') ';
on duplicate key update a=a + ?, b=concat(b,''modified'') ';
execute stmt1 using @arg00, @arg01;
execute stmt1 using @arg00, @arg01;
select * from t1;
select * from t1
order by a
;
a b
a b
4 four
0 NULL
3 three
2 two
1 one
1 one
2 two
3 three
4 four
5 five
5 five
7 sixmodified
7 sixmodified
0 NULL
8 eight
8 eight
9 nine
81 8-1
81 8-1
82 8-2
82 8-2
9 nine
set @arg00=81 ;
set @arg00=81 ;
set @arg01=1 ;
set @arg01=1 ;
execute stmt1 using @arg00, @arg01;
execute stmt1 using @arg00, @arg01;
...
@@ -2408,7 +2408,7 @@ set @updated="updated" ;
...
@@ -2408,7 +2408,7 @@ set @updated="updated" ;
insert into t1 values(1000,'x1000_1') ;
insert into t1 values(1000,'x1000_1') ;
insert into t1 values(@1000,@x1000_2),(@1000,@x1000_3)
insert into t1 values(@1000,@x1000_2),(@1000,@x1000_3)
on duplicate key update a = a + @100, b = concat(b,@updated) ;
on duplicate key update a = a + @100, b = concat(b,@updated) ;
select a,b from t1 where a >= 1000 ;
select a,b from t1 where a >= 1000
order by a
;
a b
a b
1000 x1000_3
1000 x1000_3
1100 x1000_1updated
1100 x1000_1updated
...
@@ -2417,14 +2417,14 @@ insert into t1 values(1000,'x1000_1') ;
...
@@ -2417,14 +2417,14 @@ insert into t1 values(1000,'x1000_1') ;
prepare stmt1 from ' insert into t1 values(?,?),(?,?)
prepare stmt1 from ' insert into t1 values(?,?),(?,?)
on duplicate key update a = a + ?, b = concat(b,?) ';
on duplicate key update a = a + ?, b = concat(b,?) ';
execute stmt1 using @1000, @x1000_2, @1000, @x1000_3, @100, @updated ;
execute stmt1 using @1000, @x1000_2, @1000, @x1000_3, @100, @updated ;
select a,b from t1 where a >= 1000 ;
select a,b from t1 where a >= 1000
order by a
;
a b
a b
1000 x1000_3
1000 x1000_3
1100 x1000_1updated
1100 x1000_1updated
delete from t1 where a >= 1000 ;
delete from t1 where a >= 1000 ;
insert into t1 values(1000,'x1000_1') ;
insert into t1 values(1000,'x1000_1') ;
execute stmt1 using @1000, @x1000_2, @1100, @x1000_3, @100, @updated ;
execute stmt1 using @1000, @x1000_2, @1100, @x1000_3, @100, @updated ;
select a,b from t1 where a >= 1000 ;
select a,b from t1 where a >= 1000
order by a
;
a b
a b
1200 x1000_1updatedupdated
1200 x1000_1updatedupdated
delete from t1 where a >= 1000 ;
delete from t1 where a >= 1000 ;
...
...
mysql-test/r/ps_6bdb.result
View file @
90bcde83
...
@@ -1016,7 +1016,7 @@ set @arg01=2;
...
@@ -1016,7 +1016,7 @@ set @arg01=2;
execute stmt1 using @arg00, @arg01;
execute stmt1 using @arg00, @arg01;
Warnings:
Warnings:
Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1
Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1
select a,b from t1;
select a,b from t1
order by a
;
a b
a b
0 two
0 two
1 one
1 one
...
@@ -1024,7 +1024,7 @@ a b
...
@@ -1024,7 +1024,7 @@ a b
4 four
4 four
set @arg00=0;
set @arg00=0;
execute stmt1 using @arg01, @arg00;
execute stmt1 using @arg01, @arg00;
select a,b from t1;
select a,b from t1
order by a
;
a b
a b
1 one
1 one
2 two
2 two
...
@@ -1048,7 +1048,7 @@ prepare stmt1 from 'update t1 set a=? where b=?
...
@@ -1048,7 +1048,7 @@ prepare stmt1 from 'update t1 set a=? where b=?
and a not in (select ? from t2
and a not in (select ? from t2
where b = ? or a = ?)';
where b = ? or a = ?)';
execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ;
execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ;
select a,b from t1 ;
select a,b from t1
order by a
;
a b
a b
1 one
1 one
2 two
2 two
...
@@ -1142,7 +1142,7 @@ set @arg01=1 ;
...
@@ -1142,7 +1142,7 @@ set @arg01=1 ;
prepare stmt1 from 'insert into t1 set a=?, b=''sechs''
prepare stmt1 from 'insert into t1 set a=?, b=''sechs''
on duplicate key update a=a + ?, b=concat(b,''modified'') ';
on duplicate key update a=a + ?, b=concat(b,''modified'') ';
execute stmt1 using @arg00, @arg01;
execute stmt1 using @arg00, @arg01;
select * from t1;
select * from t1
order by a
;
a b
a b
0 NULL
0 NULL
1 one
1 one
...
@@ -1170,7 +1170,7 @@ set @updated="updated" ;
...
@@ -1170,7 +1170,7 @@ set @updated="updated" ;
insert into t1 values(1000,'x1000_1') ;
insert into t1 values(1000,'x1000_1') ;
insert into t1 values(@1000,@x1000_2),(@1000,@x1000_3)
insert into t1 values(@1000,@x1000_2),(@1000,@x1000_3)
on duplicate key update a = a + @100, b = concat(b,@updated) ;
on duplicate key update a = a + @100, b = concat(b,@updated) ;
select a,b from t1 where a >= 1000 ;
select a,b from t1 where a >= 1000
order by a
;
a b
a b
1000 x1000_3
1000 x1000_3
1100 x1000_1updated
1100 x1000_1updated
...
@@ -1179,14 +1179,14 @@ insert into t1 values(1000,'x1000_1') ;
...
@@ -1179,14 +1179,14 @@ insert into t1 values(1000,'x1000_1') ;
prepare stmt1 from ' insert into t1 values(?,?),(?,?)
prepare stmt1 from ' insert into t1 values(?,?),(?,?)
on duplicate key update a = a + ?, b = concat(b,?) ';
on duplicate key update a = a + ?, b = concat(b,?) ';
execute stmt1 using @1000, @x1000_2, @1000, @x1000_3, @100, @updated ;
execute stmt1 using @1000, @x1000_2, @1000, @x1000_3, @100, @updated ;
select a,b from t1 where a >= 1000 ;
select a,b from t1 where a >= 1000
order by a
;
a b
a b
1000 x1000_3
1000 x1000_3
1100 x1000_1updated
1100 x1000_1updated
delete from t1 where a >= 1000 ;
delete from t1 where a >= 1000 ;
insert into t1 values(1000,'x1000_1') ;
insert into t1 values(1000,'x1000_1') ;
execute stmt1 using @1000, @x1000_2, @1100, @x1000_3, @100, @updated ;
execute stmt1 using @1000, @x1000_2, @1100, @x1000_3, @100, @updated ;
select a,b from t1 where a >= 1000 ;
select a,b from t1 where a >= 1000
order by a
;
a b
a b
1200 x1000_1updatedupdated
1200 x1000_1updatedupdated
delete from t1 where a >= 1000 ;
delete from t1 where a >= 1000 ;
...
@@ -1195,7 +1195,7 @@ ERROR HY000: This command is not supported in the prepared statement protocol ye
...
@@ -1195,7 +1195,7 @@ ERROR HY000: This command is not supported in the prepared statement protocol ye
set @duplicate='duplicate ' ;
set @duplicate='duplicate ' ;
set @1000=1000 ;
set @1000=1000 ;
set @5=5 ;
set @5=5 ;
select a,b from t1 where a < 5 ;
select a,b from t1 where a < 5
order by a
;
a b
a b
0 NULL
0 NULL
1 one
1 one
...
@@ -1206,7 +1206,7 @@ insert into t1 select a + @1000, concat(@duplicate,b) from t1
...
@@ -1206,7 +1206,7 @@ insert into t1 select a + @1000, concat(@duplicate,b) from t1
where a < @5 ;
where a < @5 ;
affected rows: 5
affected rows: 5
info: Records: 5 Duplicates: 0 Warnings: 0
info: Records: 5 Duplicates: 0 Warnings: 0
select a,b from t1 where a >= 1000 ;
select a,b from t1 where a >= 1000
order by a
;
a b
a b
1000 NULL
1000 NULL
1001 duplicate one
1001 duplicate one
...
@@ -1219,7 +1219,7 @@ where a < ? ' ;
...
@@ -1219,7 +1219,7 @@ where a < ? ' ;
execute stmt1 using @1000, @duplicate, @5;
execute stmt1 using @1000, @duplicate, @5;
affected rows: 5
affected rows: 5
info: Records: 5 Duplicates: 0 Warnings: 0
info: Records: 5 Duplicates: 0 Warnings: 0
select a,b from t1 where a >= 1000 ;
select a,b from t1 where a >= 1000
order by a
;
a b
a b
1000 NULL
1000 NULL
1001 duplicate one
1001 duplicate one
...
@@ -1243,7 +1243,7 @@ where (a,b) in ( select sqrt(a+@1)+CAST(@float AS signed),b
...
@@ -1243,7 +1243,7 @@ where (a,b) in ( select sqrt(a+@1)+CAST(@float AS signed),b
from t1);
from t1);
affected rows: 8
affected rows: 8
info: Records: 8 Duplicates: 0 Warnings: 0
info: Records: 8 Duplicates: 0 Warnings: 0
select a,b from t2;
select a,b from t2
order by a
;
a b
a b
3 duplicate
3 duplicate
4 duplicate
4 duplicate
...
@@ -1267,7 +1267,7 @@ select b, a + ? from t1
...
@@ -1267,7 +1267,7 @@ select b, a + ? from t1
execute stmt1 using @duplicate, @5, @five, @2, @100, @1, @float ;
execute stmt1 using @duplicate, @5, @five, @2, @100, @1, @float ;
affected rows: 8
affected rows: 8
info: Records: 8 Duplicates: 0 Warnings: 0
info: Records: 8 Duplicates: 0 Warnings: 0
select a,b from t2;
select a,b from t2
order by a
;
a b
a b
3 duplicate
3 duplicate
4 duplicate
4 duplicate
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment