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

Check constraint validation on a datetime field crashes the process

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.2.12
    • 10.2.14
    • Temporal Types
    • None
    • Debian stretch
    • 10.2.14

    Description

      Process crashes when validating check constraints on datetime values.

      Stacktrace:

      Thread pointer: 0x7fc96c0009a8
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 0x7fc9e0d07cf8 thread_stack 0x30000
      /usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x5592eecfebfe]
      /usr/sbin/mysqld(handle_fatal_signal+0x41d)[0x5592ee79e14d]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x110c0)[0x7fc9e74ee0c0]
      /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcf)[0x7fc9e5988fcf]
      /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7fc9e598a3fa]
      /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x15d)[0x7fc9e608a0ad]
      /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8f066)[0x7fc9e6088066]
      /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8f0b1)[0x7fc9e60880b1]
      /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8fb8f)[0x7fc9e6088b8f]
      /usr/sbin/mysqld(_ZN4Item24get_date_with_conversionEP13st_mysql_timey+0x31)[0x5592ee7b3081]
      /usr/sbin/mysqld(_ZN4Item19val_datetime_packedEv+0x1a)[0x5592ee582aca]
      /usr/sbin/mysqld(_Z18get_datetime_valueP3THDPPP4ItemS3_16enum_field_typesPb+0x38)[0x5592ee7d14c8]
      /usr/sbin/mysqld(_ZN14Arg_comparator16compare_temporalE16enum_field_types+0x55)[0x5592ee7d1715]
      /usr/sbin/mysqld(_ZN12Item_func_gt7val_intEv+0x2b)[0x5592ee7c950b]
      /usr/sbin/mysqld(_ZN5TABLE18verify_constraintsEb+0x59)[0x5592ee6adcd9]
      /usr/sbin/mysqld(_ZN10TABLE_LIST17view_check_optionEP3THDb+0xe8)[0x5592ee6ade48]
      /usr/sbin/mysqld(_Z12mysql_insertP3THDP10TABLE_LISTR4ListI4ItemERS3_IS5_ES6_S6_15enum_duplicatesb+0x11d5)[0x5592ee5f0e15]
      /usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x31d7)[0x5592ee605e47]
      /usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_statebb+0x28a)[0x5592ee60bb5a]
      /usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjbb+0x215f)[0x5592ee60eb5f]
      /usr/sbin/mysqld(_Z10do_commandP3THD+0x167)[0x5592ee60f4b7]
      /usr/sbin/mysqld(_Z24do_handle_one_connectionP7CONNECT+0x25a)[0x5592ee6d5f2a]
      /usr/sbin/mysqld(handle_one_connection+0x3d)[0x5592ee6d609d]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x7494)[0x7fc9e74e4494]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7fc9e5a3eaff]
      

      Reproduction:

      create database DateConstraintCrash;
      use DateConstraintCrash;
      create table t1 (id int auto_increment primary key, datecol datetime, check (datecol>'0001-01-01 00:00:00'));
      insert into t1 (datecol) values (now());
      insert into t1 (datecol) values (now());
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              Rond Rond
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.