diff options
author | unknown <patg@krsna.patg.net> | 2005-09-27 15:04:26 -0700 |
---|---|---|
committer | unknown <patg@krsna.patg.net> | 2005-09-27 15:04:26 -0700 |
commit | a5dd3d5d8f8e67cb74403f8265b9c61daf9d5ccd (patch) | |
tree | f8190e21c9333f4125f0364d2f6ba3dbb9383aaf /mysql-test | |
parent | ab00d873c5a514b5529226389798a9656f62440b (diff) | |
parent | 68985389a21b96fc9e758f8870a7ef393158c08c (diff) | |
download | mariadb-git-a5dd3d5d8f8e67cb74403f8265b9c61daf9d5ccd.tar.gz |
Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-5.0
into krsna.patg.net:/home/patg/mysql-5.0
Diffstat (limited to 'mysql-test')
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 6 | ||||
-rw-r--r-- | mysql-test/r/view.result | 26 | ||||
-rw-r--r-- | mysql-test/t/view.test | 26 |
3 files changed, 56 insertions, 2 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 2dda1b2a6e1..47c0e8f4e41 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -2137,7 +2137,8 @@ sub mysqld_start ($$$$) { { if ( $pid= mtr_spawn($exe, $args, "", $master->[$idx]->{'path_myerr'}, - $master->[$idx]->{'path_myerr'}, "") ) + $master->[$idx]->{'path_myerr'}, "", + { append_log_file => 1 }) ) { return sleep_until_file_created($master->[$idx]->{'path_mypid'}, $master->[$idx]->{'start_timeout'}, $pid); @@ -2148,7 +2149,8 @@ sub mysqld_start ($$$$) { { if ( $pid= mtr_spawn($exe, $args, "", $slave->[$idx]->{'path_myerr'}, - $slave->[$idx]->{'path_myerr'}, "") ) + $slave->[$idx]->{'path_myerr'}, "", + { append_log_file => 1 }) ) { return sleep_until_file_created($slave->[$idx]->{'path_mypid'}, $master->[$idx]->{'start_timeout'}, $pid); diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 5ae99e029e7..9742c029706 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -2262,3 +2262,29 @@ WEEKDAY(date) 1 DROP TABLE t1; DROP VIEW v1, v2, v3; +CREATE TABLE t1 ( a int, b int ); +INSERT INTO t1 VALUES (1,1),(2,2),(3,3); +CREATE VIEW v1 AS SELECT a,b FROM t1; +SELECT t1.a FROM t1 GROUP BY t1.a HAVING a > 1; +a +2 +3 +SELECT v1.a FROM v1 GROUP BY v1.a HAVING a > 1; +a +2 +3 +DROP VIEW v1; +DROP TABLE t1; +CREATE TABLE t1 ( a int, b int ); +INSERT INTO t1 VALUES (1,1),(2,2),(3,3); +CREATE VIEW v1 AS SELECT a,b FROM t1; +SELECT t1.a FROM t1 GROUP BY t1.a HAVING t1.a > 1; +a +2 +3 +SELECT v1.a FROM v1 GROUP BY v1.a HAVING v1.a > 1; +a +2 +3 +DROP VIEW v1; +DROP TABLE t1; diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index f47418b8e0a..8d3593162c7 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -2139,3 +2139,29 @@ SELECT * FROM v3; DROP TABLE t1; DROP VIEW v1, v2, v3; + +# +# Bug #13411: crash when using non-qualified view column in HAVING clause +# + +CREATE TABLE t1 ( a int, b int ); +INSERT INTO t1 VALUES (1,1),(2,2),(3,3); +CREATE VIEW v1 AS SELECT a,b FROM t1; +SELECT t1.a FROM t1 GROUP BY t1.a HAVING a > 1; +SELECT v1.a FROM v1 GROUP BY v1.a HAVING a > 1; + +DROP VIEW v1; +DROP TABLE t1; + +# +# Bug #13410: failed name resolution for qualified view column in HAVING +# + +CREATE TABLE t1 ( a int, b int ); +INSERT INTO t1 VALUES (1,1),(2,2),(3,3); +CREATE VIEW v1 AS SELECT a,b FROM t1; +SELECT t1.a FROM t1 GROUP BY t1.a HAVING t1.a > 1; +SELECT v1.a FROM v1 GROUP BY v1.a HAVING v1.a > 1; + +DROP VIEW v1; +DROP TABLE t1; |