Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-5458

RQG hits 'sql/tztime.cc:799: my_time_t sec_since_epoch(int, int, int, int, int, int): Assertion `mon > 0 && mon < 13' failed.'

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 5.5.34, 10.0.7, 5.3.13
    • 5.5.35, 10.0.8, 5.3.13
    • None
    • None
    • centos 6.2
      debug build of mariadb-5.5.34

    Description

      this RQG command causes the assert to fire:

      ./runall.pl --grammar=conf/temporal/temporal_functions.yy --duration=300 --queries=10000000 --threads=1 --basedir=/home/prohaska/mariadb-5.5.34-install/ --vardir=/home/prohaska/vardir_mariadb5534_temporal_functions_innodb_2 --mysqld=--default-storage-engine=innodb --mysqld=--general_log

      Attachments

        Activity

          The problem appeared in 5.3 tree with the following revision:

          ------------------------------------------------------------
          revno: 3674
          revision-id: bar@mariadb.org-20130812124759-8cy7ot1s3ysgned2
          parent: sanja@montyprogram.com-20130801084611-udozq8c9kxgy94bq
          committer: Alexander Barkov <bar@mariadb.org>
          branch nick: 5.3.b4652
          timestamp: Mon 2013-08-12 16:47:59 +0400
          message:
          MDEV-4652 Wrong result for CONCAT(GREATEST(TIME('00:00:01'),TIME('00:00:00'))

          ###########################

          1. Test case:

          CREATE TABLE t1 (t TIME);
          INSERT INTO t1 VALUES ('03:22:30'),('18:30:05');
          SELECT CONVERT_TZ( GREATEST( t, CURRENT_DATE() ), 'Europe/Moscow', 'Japan' ) FROM t1;

          ################################

          mysqld: tztime.cc:792: my_time_t sec_since_epoch(int, int, int, int, int, int): Assertion `mon > 0 && mon < 13' failed.
          131221 3:17:21 [ERROR] mysqld got signal 6 ;

          #6 0x00007f5df8abd621 in *_GI__assert_fail (assertion=0xd99279 "mon > 0 && mon < 13", file=<optimized out>, line=792, function=0xd9a4e0 "my_time_t sec_since_epoch(int, int, int, int, int, int)") at assert.c:81
          #7 0x00000000008c8f20 in sec_since_epoch (year=2013, mon=0, mday=0, hour=9720, min=0, sec=0) at tztime.cc:792
          #8 0x00000000008c91a5 in TIME_to_gmt_sec (t=0x7f5deffd8f20, sp=0x34174f8, error_code=0x7f5deffd8ec4) at tztime.cc:935
          #9 0x00000000008c9575 in Time_zone_db::TIME_to_gmt_sec (this=0x3418d48, t=0x7f5deffd8f20, error_code=0x7f5deffd8ec4) at tztime.cc:1254
          #10 0x000000000061a866 in Item_func_convert_tz::get_date (this=0x346fff0, ltime=0x7f5deffd8f20, fuzzy_date=0) at item_timefunc.cc:1842
          #11 0x00000000005af8b3 in Item::send (this=0x346fff0, protocol=0x33ebfd0, buffer=0x7f5deffd8ff0) at item.cc:6113
          #12 0x000000000067e53b in select_send::send_data (this=0x3470698, items=...) at sql_class.cc:2012
          #13 0x0000000000752c01 in end_send (join=0x34706b8, join_tab=0x349c0a0, end_of_records=false) at sql_select.cc:17329
          #14 0x0000000000750b15 in evaluate_join_record (join=0x34706b8, join_tab=0x349bd80, error=0) at sql_select.cc:16469
          #15 0x00000000007502fc in sub_select (join=0x34706b8, join_tab=0x349bd80, end_of_records=false) at sql_select.cc:16271
          #16 0x000000000074f9fd in do_select (join=0x34706b8, fields=0x33ee770, table=0x0, procedure=0x0) at sql_select.cc:15924
          #17 0x000000000072ee0b in JOIN::exec (this=0x34706b8) at sql_select.cc:2788
          #18 0x000000000072f6a5 in mysql_select (thd=0x33ebbc8, rref_pointer_array=0x33ee8b8, tables=0x34701f0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0x3470698, unit=0x33ee158, select_lex=0x33ee660) at sql_select.cc:3009
          #19 0x0000000000726105 in handle_select (thd=0x33ebbc8, lex=0x33ee0b8, result=0x3470698, setup_tables_done_option=0) at sql_select.cc:288
          #20 0x00000000006b4dec in execute_sqlcom_select (thd=0x33ebbc8, all_tables=0x34701f0) at sql_parse.cc:5172
          #21 0x00000000006abf88 in mysql_execute_command (thd=0x33ebbc8) at sql_parse.cc:2305
          #22 0x00000000006b7753 in mysql_parse (thd=0x33ebbc8, rawbuf=0x346f900 "SELECT CONVERT_TZ( GREATEST( t, CURRENT_DATE() ), 'Europe/Moscow', 'Japan' ) FROM t1", length=84, found_semicolon=0x7f5deffdacb8) at sql_parse.cc:6173
          #23 0x00000000006a9768 in dispatch_command (command=COM_QUERY, thd=0x33ebbc8, packet=0x3466499 "", packet_length=84) at sql_parse.cc:1243
          #24 0x00000000006a8a54 in do_command (thd=0x33ebbc8) at sql_parse.cc:923
          #25 0x00000000006a58dd in handle_one_connection (arg=0x33ebbc8) at sql_connect.cc:1231
          #26 0x00007f5df97c9b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
          #27 0x00007f5df8b6ca7d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

          elenst Elena Stepanova added a comment - The problem appeared in 5.3 tree with the following revision: ------------------------------------------------------------ revno: 3674 revision-id: bar@mariadb.org-20130812124759-8cy7ot1s3ysgned2 parent: sanja@montyprogram.com-20130801084611-udozq8c9kxgy94bq committer: Alexander Barkov <bar@mariadb.org> branch nick: 5.3.b4652 timestamp: Mon 2013-08-12 16:47:59 +0400 message: MDEV-4652 Wrong result for CONCAT(GREATEST(TIME('00:00:01'),TIME('00:00:00')) ########################### Test case: CREATE TABLE t1 (t TIME); INSERT INTO t1 VALUES ('03:22:30'),('18:30:05'); SELECT CONVERT_TZ( GREATEST( t, CURRENT_DATE() ), 'Europe/Moscow', 'Japan' ) FROM t1; ################################ mysqld: tztime.cc:792: my_time_t sec_since_epoch(int, int, int, int, int, int): Assertion `mon > 0 && mon < 13' failed. 131221 3:17:21 [ERROR] mysqld got signal 6 ; #6 0x00007f5df8abd621 in *_ GI __assert_fail (assertion=0xd99279 "mon > 0 && mon < 13", file=<optimized out>, line=792, function=0xd9a4e0 "my_time_t sec_since_epoch(int, int, int, int, int, int)") at assert.c:81 #7 0x00000000008c8f20 in sec_since_epoch (year=2013, mon=0, mday=0, hour=9720, min=0, sec=0) at tztime.cc:792 #8 0x00000000008c91a5 in TIME_to_gmt_sec (t=0x7f5deffd8f20, sp=0x34174f8, error_code=0x7f5deffd8ec4) at tztime.cc:935 #9 0x00000000008c9575 in Time_zone_db::TIME_to_gmt_sec (this=0x3418d48, t=0x7f5deffd8f20, error_code=0x7f5deffd8ec4) at tztime.cc:1254 #10 0x000000000061a866 in Item_func_convert_tz::get_date (this=0x346fff0, ltime=0x7f5deffd8f20, fuzzy_date=0) at item_timefunc.cc:1842 #11 0x00000000005af8b3 in Item::send (this=0x346fff0, protocol=0x33ebfd0, buffer=0x7f5deffd8ff0) at item.cc:6113 #12 0x000000000067e53b in select_send::send_data (this=0x3470698, items=...) at sql_class.cc:2012 #13 0x0000000000752c01 in end_send (join=0x34706b8, join_tab=0x349c0a0, end_of_records=false) at sql_select.cc:17329 #14 0x0000000000750b15 in evaluate_join_record (join=0x34706b8, join_tab=0x349bd80, error=0) at sql_select.cc:16469 #15 0x00000000007502fc in sub_select (join=0x34706b8, join_tab=0x349bd80, end_of_records=false) at sql_select.cc:16271 #16 0x000000000074f9fd in do_select (join=0x34706b8, fields=0x33ee770, table=0x0, procedure=0x0) at sql_select.cc:15924 #17 0x000000000072ee0b in JOIN::exec (this=0x34706b8) at sql_select.cc:2788 #18 0x000000000072f6a5 in mysql_select (thd=0x33ebbc8, rref_pointer_array=0x33ee8b8, tables=0x34701f0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0x3470698, unit=0x33ee158, select_lex=0x33ee660) at sql_select.cc:3009 #19 0x0000000000726105 in handle_select (thd=0x33ebbc8, lex=0x33ee0b8, result=0x3470698, setup_tables_done_option=0) at sql_select.cc:288 #20 0x00000000006b4dec in execute_sqlcom_select (thd=0x33ebbc8, all_tables=0x34701f0) at sql_parse.cc:5172 #21 0x00000000006abf88 in mysql_execute_command (thd=0x33ebbc8) at sql_parse.cc:2305 #22 0x00000000006b7753 in mysql_parse (thd=0x33ebbc8, rawbuf=0x346f900 "SELECT CONVERT_TZ( GREATEST( t, CURRENT_DATE() ), 'Europe/Moscow', 'Japan' ) FROM t1", length=84, found_semicolon=0x7f5deffdacb8) at sql_parse.cc:6173 #23 0x00000000006a9768 in dispatch_command (command=COM_QUERY, thd=0x33ebbc8, packet=0x3466499 "", packet_length=84) at sql_parse.cc:1243 #24 0x00000000006a8a54 in do_command (thd=0x33ebbc8) at sql_parse.cc:923 #25 0x00000000006a58dd in handle_one_connection (arg=0x33ebbc8) at sql_connect.cc:1231 #26 0x00007f5df97c9b50 in start_thread (arg=<optimized out>) at pthread_create.c:304 #27 0x00007f5df8b6ca7d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

          Is also repeatable with numeric time zone nitatiob:

          DROP TABLE IF EXISTS t1;
          CREATE TABLE t1 (t TIME);
          INSERT INTO t1 VALUES ('03:22:30'),('18:30:05');
          SELECT CONVERT_TZ(GREATEST(t, CURRENT_DATE()), '+02:00', '+10:00') FROM t1;

          bar Alexander Barkov added a comment - Is also repeatable with numeric time zone nitatiob: DROP TABLE IF EXISTS t1; CREATE TABLE t1 (t TIME); INSERT INTO t1 VALUES ('03:22:30'),('18:30:05'); SELECT CONVERT_TZ(GREATEST(t, CURRENT_DATE()), '+02:00', '+10:00') FROM t1;

          Fixed in 5.3.13 and 5.5.35

          bar Alexander Barkov added a comment - Fixed in 5.3.13 and 5.5.35
          dbart Daniel Bartholomew added a comment - http://bazaar.launchpad.net/~maria-captains/maria/5.5/revision/2502.567.187
          dbart Daniel Bartholomew added a comment - http://bazaar.launchpad.net/~maria-captains/maria/5.5/revision/2502.567.188

          People

            bar Alexander Barkov
            prohaska7 Rich Prohaska
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.