diff options
author | dlenev@brandersnatch.localdomain <> | 2005-01-26 22:25:02 +0300 |
---|---|---|
committer | dlenev@brandersnatch.localdomain <> | 2005-01-26 22:25:02 +0300 |
commit | 80282016c230ea6e91d629b1147a40e262487cb0 (patch) | |
tree | 72a9f7c083067cfd405c029c61debdc8f66d5fe0 /mysql-test/t/timezone2.test | |
parent | 373dbb475045622e40a74b27292bb2cc78941a87 (diff) | |
download | mariadb-git-80282016c230ea6e91d629b1147a40e262487cb0.tar.gz |
Fix for bug #7899 "CREATE TABLE .. SELECT .. and CONVERT_TZ() function
does not work well together". Now using simplier and more correct
implementation of st_lex::unlink_first_table()/link_first_table_back()
(It also nicely handles case when global table list is created because
of implictly used time zone tables). (2nd attempt)
Fix for bug #7705 "CONVERT_TZ() crashes with subquery/WHERE on index
column". Implemented new approach for caching objects for constant
time zone arguments. Now instead of determining whenever these arguments
are constants and performing time zone lookup at fix_fields() stage, we
do it on first get_date() invocation.
Cleanup of global @@time_zone variable handling.
Diffstat (limited to 'mysql-test/t/timezone2.test')
-rw-r--r-- | mysql-test/t/timezone2.test | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/t/timezone2.test b/mysql-test/t/timezone2.test index d185a647921..32ed359a2db 100644 --- a/mysql-test/t/timezone2.test +++ b/mysql-test/t/timezone2.test @@ -266,3 +266,20 @@ delete from mysql.db where user like 'mysqltest\_%'; delete from mysql.tables_priv where user like 'mysqltest\_%'; flush privileges; drop table t1, t2; + +# +# Test for bug #7705 "CONVERT_TZ() crashes with subquery/WHERE on index +# column". Queries in which one of time zone arguments of CONVERT_TZ() is +# determined as constant only at val() stage (not at fix_fields() stage), +# should not crash server. +# +select convert_tz('2005-01-14 17:00:00', 'UTC', custTimeZone) from (select 'UTC' as custTimeZone) as tmp; + +# +# Test for bug #7899 "CREATE TABLE .. SELECT .. and CONVERT_TZ() function +# does not work well together". The following statement should return only +# one NULL row and not result of full join. +# +create table t1 select convert_tz(NULL, NULL, NULL); +select * from t1; +drop table t1; |