diff options
author | Alexander Nozdrin <alik@sun.com> | 2010-01-19 19:36:14 +0300 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2010-01-19 19:36:14 +0300 |
commit | a6667f8577b0830f27dfbafb48561c23aee08ebd (patch) | |
tree | 688c26274e23ab44604f2f276f6a5c78e49241bf /mysql-test/t/user_var.test | |
parent | 40271e4f5edacc6fe90ed74a087e5ff25daea899 (diff) | |
parent | 0835775b7c3b074332800ee92112d68b28cec083 (diff) | |
download | mariadb-git-a6667f8577b0830f27dfbafb48561c23aee08ebd.tar.gz |
Manual merge from mysql-trunk-merge.
Conflicts:
- configure.in
- include/m_string.h
- mysql-test/extra/rpl_tests/rpl_row_func003.test
- mysql-test/r/mysqlbinlog.result
- mysql-test/r/union.result
- mysql-test/suite/binlog/r/binlog_killed_simulate.result
- mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
- mysql-test/suite/binlog/r/binlog_unsafe.result
- mysql-test/suite/binlog/t/binlog_unsafe.test
- mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
- mysql-test/suite/rpl/r/rpl_loaddata_map.result
- mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result
- mysql-test/suite/rpl/r/rpl_stm_log.result
- mysql-test/suite/rpl/t/rpl_optimize.test
- mysql-test/t/mysqlbinlog.test
- mysql-test/t/union.test
- sql/rpl_utility.h
- sql/sql_union.cc
- strings/Makefile.am
Diffstat (limited to 'mysql-test/t/user_var.test')
-rw-r--r-- | mysql-test/t/user_var.test | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/t/user_var.test b/mysql-test/t/user_var.test index 19c70c76139..5147b098ae0 100644 --- a/mysql-test/t/user_var.test +++ b/mysql-test/t/user_var.test @@ -293,6 +293,26 @@ SELECT @a, @b; SELECT a, b FROM t1 WHERE a=2 AND b=3 GROUP BY a, b; DROP TABLE t1; +# +# Bug#47371: reference by same column name +# +CREATE TABLE t1 (f1 int(11) default NULL, f2 int(11) default NULL); +CREATE TABLE t2 (f1 int(11) default NULL, f2 int(11) default NULL, foo int(11)); +CREATE TABLE t3 (f1 int(11) default NULL, f2 int(11) default NULL); + +INSERT INTO t1 VALUES(10, 10); +INSERT INTO t1 VALUES(10, 10); +INSERT INTO t2 VALUES(10, 10, 10); +INSERT INTO t2 VALUES(10, 10, 10); +INSERT INTO t3 VALUES(10, 10); +INSERT INTO t3 VALUES(10, 10); + +SELECT MIN(t2.f1), +@bar:= (SELECT MIN(t3.f2) FROM t3 WHERE t3.f2 > foo) +FROM t1,t2 WHERE t1.f1 = t2.f1 ORDER BY t2.f1; + +DROP TABLE t1, t2, t3; + --echo End of 5.0 tests # |