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

Crash in UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'))

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.0.3, 5.5.31, 5.1.67, 5.2.14, 5.3.12
    • 10.0.4, 5.5.32, 5.3.13
    • None

    Description

      This SQL script crashes the server (debug build):

      SET TIME_ZONE='+02:00'
      SELECT UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'));

      Stack trace:

      #4 0x00000000006df193 in sec_since_epoch (year=2020, mon=0, mday=0, hour=0, min=0, sec=0)
      at /home/bar/maria-bzr/maria-10.0-connect/sql/tztime.cc:799
      #5 0x00000000006df9f9 in Time_zone_offset::TIME_to_gmt_sec (this=0x2887d40,
      t=0x7fffcc2e92f0, error_code=0x7fffcc2e9324)
      at /home/bar/maria-bzr/maria-10.0-connect/sql/tztime.cc:1385
      #6 0x00000000006dc801 in TIME_to_timestamp (thd=0x2b1b920, t=0x7fffcc2e92f0,
      error_code=0x7fffcc2e9324)
      at /home/bar/maria-bzr/maria-10.0-connect/sql/sql_time.cc:420
      #7 0x000000000086d016 in Item_func_unix_timestamp::get_timestamp_value (
      this=0x7fff900067d8, seconds=0x7fffcc2e9350, second_part=0x7fffcc2e9358)
      at /home/bar/maria-bzr/maria-10.0-connect/sql/item_timefunc.cc:1197

      Attachments

        Activity

          People

            bar Alexander Barkov
            bar Alexander Barkov
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.