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

Assertion failure in Protocol::end_statement upon HANDLER READ with invalid timestamp

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11
    • 10.5.28, 10.6.21, 10.11.11, 11.4.5, 11.7.2
    • Server
    • None

    Description

      CREATE TABLE t (a TIMESTAMP, KEY(a));
      HANDLER t OPEN;
      HANDLER t READ a > ('2022-12');
       
      # Cleanup
      HANDLER t CLOSE;
      DROP TABLE t;
      

      10.3 0ca3aaa7

      mysqld: /sql/protocol.cc:601: void Protocol::end_statement(): Assertion `0' failed.
      221219  2:24:02 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f2c9d1d6662 in __GI___assert_fail (assertion=0x55da312e5be0 "0", file=0x55da312e50e0 "/sql/protocol.cc", line=601, function=0x55da312e5b20 "void Protocol::end_statement()") at assert.c:101
      #8  0x000055da2f495d66 in Protocol::end_statement (this=0x62a0000607e8) at /sql/protocol.cc:601
      #9  0x000055da2f71faab in dispatch_command (command=COM_QUERY, thd=0x62a000060208, packet=0x6290000eb209 "HANDLER t READ a > ('2022-12')", packet_length=30, is_com_multi=false, is_next_command=false) at /sql/sql_parse.cc:2410
      #10 0x000055da2f719154 in do_command (thd=0x62a000060208) at /sql/sql_parse.cc:1398
      #11 0x000055da2fadcf88 in do_handle_one_connection (connect=0x608000000ca8) at /sql/sql_connect.cc:1404
      #12 0x000055da2fadc884 in handle_one_connection (arg=0x608000000ca8) at /sql/sql_connect.cc:1309
      #13 0x000055da3108a375 in pfs_spawn_thread (arg=0x615000004e08) at /storage/perfschema/pfs.cc:1869
      #14 0x00007f2c9d381ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #15 0x00007f2c9d2a1aef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      No obvious immediate problem on a non-debug build.

      Attachments

        Issue Links

          Activity

            Nothing was sent to the client (no error no OK/EOF)

            because it goes to an ERROR without actually sending error

            sanja Oleksandr Byelkin added a comment - Nothing was sent to the client (no error no OK/EOF) because it goes to an ERROR without actually sending error

            Field_timestamp::store_TIME_with_warning return warning (which is not protocol error) and return error as a result (so upper levels thing error returnned

            sanja Oleksandr Byelkin added a comment - Field_timestamp::store_TIME_with_warning return warning (which is not protocol error) and return error as a result (so upper levels thing error returnned

            The problem was incorrect result interpretation by HANDLER.

            sanja Oleksandr Byelkin added a comment - The problem was incorrect result interpretation by HANDLER.

            commit 271b73770cd5bd13bb52bfa4dd91c8d275920467 (HEAD -> bb-10.5-MDEV-30263, origin/bb-10.5-MDEV-30263)
            Author: Oleksandr Byelkin <sanja@mariadb.com>
            Date:   Fri Dec 13 16:27:14 2024 +0100
             
                MDEV-30263 Assertion failure in Protocol::end_statement upon HANDLER READ with invalid timestamp
                
                Process save_in_field() return codes as in other places (<0 is real
                error)
            

            sanja Oleksandr Byelkin added a comment - commit 271b73770cd5bd13bb52bfa4dd91c8d275920467 (HEAD -> bb-10.5-MDEV-30263, origin/bb-10.5-MDEV-30263) Author: Oleksandr Byelkin <sanja@mariadb.com> Date: Fri Dec 13 16:27:14 2024 +0100   MDEV-30263 Assertion failure in Protocol::end_statement upon HANDLER READ with invalid timestamp Process save_in_field() return codes as in other places (<0 is real error)

            Got reviewed by Nikita

            sanja Oleksandr Byelkin added a comment - Got reviewed by Nikita

            People

              sanja Oleksandr Byelkin
              elenst Elena Stepanova
              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.