diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2015-10-22 16:08:45 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2015-10-28 10:06:30 +0100 |
commit | b0e3f484f76bfcd26f8da919d621f56972d21aa7 (patch) | |
tree | 0f5a2c0236ad40f4e02efb053593aeebe4dfb7db /mysql-test/t/ps.test | |
parent | ac67f9a42ac6b52ea1673fd5bf40e2563b6c4004 (diff) | |
download | mariadb-git-b0e3f484f76bfcd26f8da919d621f56972d21aa7.tar.gz |
MDEV-8756 MariaDB 10.0.21 crashes during PREPARE
Non-select-like queries has no correct JOIN structure connected to top-most SELECT_LEX (and should not).
Diffstat (limited to 'mysql-test/t/ps.test')
-rw-r--r-- | mysql-test/t/ps.test | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index 0233b2e428b..c45b27281a7 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -3633,3 +3633,25 @@ SELECT 1 FROM t1 GROUP BY 0 OR 18446744073709551615+1; drop table t1; --echo # End of 5.3 tests + +--echo # +--echo # MDEV-8756: MariaDB 10.0.21 crashes during PREPARE +--echo # + +CREATE TABLE t1 ( id INT(10), value INT(10) ); +CREATE TABLE t2 ( id INT(10) ); +SET @save_sql_mode= @@sql_mode; +SET SESSION sql_mode = 'ONLY_FULL_GROUP_BY'; + +PREPARE stmt FROM 'UPDATE t1 t1 SET value = (SELECT 1 FROM t2 WHERE id = t1.id)'; +execute stmt; +insert into t1 values (1,10),(2,10),(3,10); +insert into t2 values (1),(2); +execute stmt; +select * from t1; +deallocate prepare stmt; +SET SESSION sql_mode = @save_sql_mode; +DROP TABLE t1,t2; + + +--echo # End of 10.0 tests |