diff options
Diffstat (limited to 'mysql-test/main/having.test')
-rw-r--r-- | mysql-test/main/having.test | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/mysql-test/main/having.test b/mysql-test/main/having.test index 8b0cc244f51..7e0a0439f8e 100644 --- a/mysql-test/main/having.test +++ b/mysql-test/main/having.test @@ -891,6 +891,7 @@ DROP TABLE t1; DROP FUNCTION next_seq_value; DROP TABLE series; + --echo # --echo # MDEV-24958 Server crashes in my_strtod / --echo # Value_source::Converter_strntod::Converter_strntod with DEFAULT(blob) @@ -910,3 +911,36 @@ alter table t1 add column b int default (rand()+1+3); --replace_column 1 # select default(b) AS h FROM t1 HAVING h > "2"; drop table t1; + +--echo # End of 10.3 tests + +--echo # +--echo # MDEV-18681: AND formula in HAVING with several occurances +--echo # of the same field f in different conjuncts + f=constant +--echo # + +CREATE TABLE t1 (pk int, f varchar(1)); +INSERT INTO t1 VALUES (2,'x'), (7,'y'); +CREATE TABLE t2 (pk int); +INSERT INTO t2 VALUES (2), (3); + +SELECT t.f +FROM (SELECT t1.* FROM (t1 JOIN t2 ON (t2.pk = t1.pk))) t +HAVING t.f != 112 AND t.f = 'x' AND t.f != 'a'; + +DROP TABLE t1,t2; + + +--echo # +--echo # MDEV-20200: AddressSanitizer: use-after-poison in +--echo # Item_direct_view_ref::get_null_ref_table +--echo # + +CREATE TABLE t (f VARCHAR(512)); +INSERT INTO t VALUES ('a'),('b'); +SELECT * FROM t HAVING f = 'foo'; + +# Cleanup +DROP TABLE t; + +--echo # End of 10.4 tests |