MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:eugene Date:September 14 2005 8:08pm
Subject:bk commit into 5.0 tree (evgen:1.1959) BUG#11416
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of evgen. When evgen does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1959 05/09/15 00:08:12 evgen@stripped +3 -0
  Fix bug #11416 Server crash if using a view that uses function convert_tz
  
  When parser parses function convert_tz it loads available timezone tables in
  thd->lex->time_zone_tables_used. But view have another lex that main query.
  Thus time_zone_tables_used of main query left uninitialized.
  When Item_func_conver_tz is fixed it takes timezone tables from main query
  and later when it executed it assumes that timezone tables are loaded and
  failed that assertion.
  

  mysql-test/t/view.test
    1.108 05/09/15 00:07:36 evgen@stripped +7 -0
    Test case for bug#11416 Server crash if using a view that uses function convert_tz

  mysql-test/r/view.result
    1.116 05/09/15 00:07:11 evgen@stripped +5 -0
    Test case for bug#11416 Server crash if using a view that uses function convert_tz

  sql/sql_view.cc
    1.64 05/09/15 00:06:39 evgen@stripped +2 -0
    Fix bug #11416 Server crash if using a view that uses function convert_tz

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	evgen
# Host:	moonbone.local
# Root:	/work/11416-bug-5.0-mysql

--- 1.115/mysql-test/r/view.result	2005-09-14 18:27:29 +04:00
+++ 1.116/mysql-test/r/view.result	2005-09-15 00:07:11 +04:00
@@ -2205,3 +2205,8 @@
 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;

--- 1.107/mysql-test/t/view.test	2005-09-14 12:07:00 +04:00
+++ 1.108/mysql-test/t/view.test	2005-09-15 00:07:36 +04:00
@@ -2086,3 +2086,10 @@
 select * from (select f1 as f2 from v1) v where v.f2='a';
 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;

--- 1.63/sql/sql_view.cc	2005-09-14 13:26:02 +04:00
+++ 1.64/sql/sql_view.cc	2005-09-15 00:06:39 +04:00
@@ -1069,6 +1069,8 @@
 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);
 
Thread
bk commit into 5.0 tree (evgen:1.1959) BUG#11416eugene14 Sep