diff options
author | unknown <evgen@moonbone.local> | 2005-09-15 21:24:41 +0400 |
---|---|---|
committer | unknown <evgen@moonbone.local> | 2005-09-15 21:24:41 +0400 |
commit | a45bc3ae8d33879b674226de714d5a0ed66c70fc (patch) | |
tree | c82b5983378a059c7f7e51678d027ec4d8d0b4c3 | |
parent | fa8082c4cb59a9659a3c4de19a9bfe3598351dc7 (diff) | |
parent | 607d87bbe8c5eb0584fb52158fe5ee7acf953244 (diff) | |
download | mariadb-git-a45bc3ae8d33879b674226de714d5a0ed66c70fc.tar.gz |
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/11416-bug-5.0-mysql
-rw-r--r-- | mysql-test/r/view.result | 5 | ||||
-rw-r--r-- | mysql-test/t/view.test | 7 | ||||
-rw-r--r-- | sql/sql_view.cc | 2 |
3 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 4cb3db2e4aa..a40d776000d 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -2205,6 +2205,11 @@ select * from (select f1 as f2 from v1) v where v.f2='a'; f2 drop view v1; drop table t1; +create view v1 as SELECT CONVERT_TZ('2004-01-01 12:00:00','GMT','MET'); +select * from v1; +CONVERT_TZ('2004-01-01 12:00:00','GMT','MET') +NULL +drop view v1; CREATE TABLE t1 (date DATE NOT NULL); INSERT INTO t1 VALUES ('2005-09-06'); CREATE VIEW v1 AS SELECT DAYNAME(date) FROM t1; diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 0e3a7b8aeac..59ec47821f6 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -2088,6 +2088,13 @@ drop view v1; drop table t1; # +# Bug #11416 Server crash if using a view that uses function convert_tz +# +create view v1 as SELECT CONVERT_TZ('2004-01-01 12:00:00','GMT','MET'); +select * from v1; +drop view v1; + +# # Bugs #12963, #13000: wrong creation of VIEW with DAYNAME, DAYOFWEEK, and WEEKDAY # diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 5155e605ce0..c26f9cc4d71 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -1069,6 +1069,8 @@ ok: ok2: if (arena) thd->restore_active_arena(arena, &backup); + if (!old_lex->time_zone_tables_used && thd->lex->time_zone_tables_used) + old_lex->time_zone_tables_used= thd->lex->time_zone_tables_used; thd->lex= old_lex; DBUG_RETURN(0); |