mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 02:51:44 +01:00
post-review changes (Bug#4090)
This commit is contained in:
parent
cb0f607c5e
commit
c6cd51798b
2 changed files with 29 additions and 6 deletions
|
@ -1841,11 +1841,6 @@ id name id pet
|
|||
2 Rebecca 2 Spot
|
||||
3 NULL 3 Felix
|
||||
drop table t1,t2;
|
||||
DROP TABLE IF EXISTS t1, t2, t3;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
Note 1051 Unknown table 't2'
|
||||
Note 1051 Unknown table 't3'
|
||||
CREATE TABLE t1 ( a int, b int );
|
||||
CREATE TABLE t2 ( c int, d int );
|
||||
INSERT INTO t1 VALUES (1,2), (2,3), (3,4);
|
||||
|
@ -1866,4 +1861,24 @@ abc b
|
|||
1 2
|
||||
2 3
|
||||
3 4
|
||||
prepare stmt1 from "INSERT INTO t2 SELECT a AS abc, b FROM t1 WHERE b = (SELECT MIN(b) FROM t1 WHERE a=abc);";
|
||||
execute stmt1;
|
||||
deallocate prepare stmt1;
|
||||
select * from t2;
|
||||
c d
|
||||
1 2
|
||||
2 3
|
||||
3 4
|
||||
1 2
|
||||
2 3
|
||||
3 4
|
||||
drop table t3;
|
||||
prepare stmt1 from "CREATE TABLE t3 SELECT a AS abc, b FROM t1 WHERE b = (SELECT MIN(b) FROM t1 WHERE a=abc);";
|
||||
execute stmt1;
|
||||
select * from t3;
|
||||
abc b
|
||||
1 2
|
||||
2 3
|
||||
3 4
|
||||
deallocate prepare stmt1;
|
||||
DROP TABLE t1, t2, t3;
|
||||
|
|
|
@ -1182,7 +1182,6 @@ drop table t1,t2;
|
|||
#
|
||||
# outer fields resolving in INSERT/REPLACE and CRETE with SELECT
|
||||
#
|
||||
DROP TABLE IF EXISTS t1, t2, t3;
|
||||
CREATE TABLE t1 ( a int, b int );
|
||||
CREATE TABLE t2 ( c int, d int );
|
||||
INSERT INTO t1 VALUES (1,2), (2,3), (3,4);
|
||||
|
@ -1191,4 +1190,13 @@ INSERT INTO t2 SELECT a AS abc, b FROM t1 WHERE b = (SELECT MIN(b) FROM t1 WHERE
|
|||
select * from t2;
|
||||
CREATE TABLE t3 SELECT a AS abc, b FROM t1 WHERE b = (SELECT MIN(b) FROM t1 WHERE a=abc);
|
||||
select * from t3;
|
||||
prepare stmt1 from "INSERT INTO t2 SELECT a AS abc, b FROM t1 WHERE b = (SELECT MIN(b) FROM t1 WHERE a=abc);";
|
||||
execute stmt1;
|
||||
deallocate prepare stmt1;
|
||||
select * from t2;
|
||||
drop table t3;
|
||||
prepare stmt1 from "CREATE TABLE t3 SELECT a AS abc, b FROM t1 WHERE b = (SELECT MIN(b) FROM t1 WHERE a=abc);";
|
||||
execute stmt1;
|
||||
select * from t3;
|
||||
deallocate prepare stmt1;
|
||||
DROP TABLE t1, t2, t3;
|
||||
|
|
Loading…
Add table
Reference in a new issue