diff options
author | unknown <gshchepa/uchum@gleb.loc> | 2007-06-24 03:35:27 +0500 |
---|---|---|
committer | unknown <gshchepa/uchum@gleb.loc> | 2007-06-24 03:35:27 +0500 |
commit | 26b526dc608ffb16e46729de6638d1ee9d668907 (patch) | |
tree | d8246af6017c853cb8d2e86ed1cc7972bf2bd9ea /mysql-test/t/insert_select.test | |
parent | fdbefa8d528faf8e1d99d251c23c8a77f14b1aa2 (diff) | |
parent | d37471b4ef931a0b945e20753203dbc3a266bcd5 (diff) | |
download | mariadb-git-26b526dc608ffb16e46729de6638d1ee9d668907.tar.gz |
Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into gleb.loc:/home/uchum/work/bk/5.1-opt
libmysql/libmysql.c:
Merge with 5.0-opt.
mysql-test/r/insert_select.result:
Merge with 5.0-opt.
mysql-test/r/mysqlbinlog.result:
Merge with 5.0-opt.
mysql-test/r/rpl_change_master.result:
Merge with 5.0-opt.
mysql-test/r/view.result:
Merge with 5.0-opt.
mysql-test/t/insert_select.test:
Merge with 5.0-opt.
mysql-test/t/mysqlbinlog.test:
Merge with 5.0-opt.
mysql-test/t/rpl_change_master.test:
Merge with 5.0-opt.
mysql-test/t/view.test:
Merge with 5.0-opt.
sql/item.cc:
Merge with 5.0-opt.
sql/item.h:
Merge with 5.0-opt.
sql/log_event.cc:
Merge with 5.0-opt.
sql/sql_select.cc:
Merge with 5.0-opt.
Diffstat (limited to 'mysql-test/t/insert_select.test')
-rw-r--r-- | mysql-test/t/insert_select.test | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/t/insert_select.test b/mysql-test/t/insert_select.test index 655b43d65ad..10bc58303ca 100644 --- a/mysql-test/t/insert_select.test +++ b/mysql-test/t/insert_select.test @@ -233,7 +233,9 @@ drop table t1,t2; CREATE TABLE t1 (a int PRIMARY KEY); INSERT INTO t1 values (1), (2); +flush status; INSERT INTO t1 SELECT a + 2 FROM t1 LIMIT 1; +show status like 'Handler_read%'; DROP TABLE t1; @@ -319,3 +321,26 @@ INSERT INTO t2 (d) SELECT * FROM t2; DROP TABLE t1,t2; + +# +# Bug #29095: incorrect pushing of LIMIT into the temporary +# table ignoring ORDER BY clause +# + +CREATE TABLE t1 ( + id INT AUTO_INCREMENT PRIMARY KEY, + prev_id INT, + join_id INT DEFAULT 0); + +INSERT INTO t1 (prev_id) VALUES (NULL), (1), (2); +SELECT * FROM t1; + +CREATE TABLE t2 (join_id INT); +INSERT INTO t2 (join_id) VALUES (0); + +INSERT INTO t1 (prev_id) SELECT id + FROM t2 LEFT JOIN t1 ON t1.join_id = t2.join_id + ORDER BY id DESC LIMIT 1; +SELECT * FROM t1; + +DROP TABLE t1,t2; |