Bug #11416 Server crash if using a view that uses function convert_tz
Submitted: 17 Jun 2005 15:41 Modified: 15 Sep 2005 19:15
Reporter: Konstantin Osipov (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S3 (Non-critical)
Version: OS:
Assigned to: Evgeny Potemkin CPU Architecture:Any

[17 Jun 2005 15:41] Konstantin Osipov
Description:
Time zone tables are not installed.

mysql> drop view v1;
Query OK, 0 rows affected (0.00 sec)

mysql> create view v1 as SELECT CONVERT_TZ('2004-01-01 12:00:00','GMT','MET');
Query OK, 0 rows affected (0.00 sec)

mysql> select * from v1;
ERROR 2013: Lost connection to MySQL server during query

Server output:
mysqld: tztime.cc:2182: Time_zone* my_tz_find(const String*, TABLE_LIST*): Assertion `!time_zone_tables_exist || tz_tables || _current_thd()->slave_thread' failed.
mysqld got signal 6;

How to repeat:
See description.
[14 Sep 2005 20:07] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/29866
[15 Sep 2005 17:27] Evgeny Potemkin
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.

Fixed in 5.0.14, cset 1.1958.3.1
[15 Sep 2005 19:15] Paul DuBois
Noted in 5.0.14 changelog.