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

init-file stops getting executed if a long enough line is encountered; on a debug version, assertion `! is_set() || can_overwrite_status' fails

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0.0
    • 10.0.1
    • None
    • None

    Description

      The part with the wrong result is also reproducible on MySQL and filed as http://bugs.mysql.com/bug.php?id=67345.

      If a server is started with the init-file parameter and the file contains long enough lines (for me, the problem starts with 20,000 characters), it looks like the file stops being executed after such a line is encountered. On a debug build, it causes the assertion failure:

      10.0-serg/sql/sql_error.cc:422: void Diagnostics_area::set_error_status(THD*, uint, const char*, const char*): Assertion `! is_set() || can_overwrite_status' failed
       
      #6  0x00007fe69ba38d4d in __GI___assert_fail (assertion=0xd6cf80 "! is_set() || can_overwrite_status", file=<optimized out>, line=422, function=<optimized out>) at assert.c:81
      #7  0x00000000005ea34b in Diagnostics_area::set_error_status (this=0x3b988e0, thd=0x3b94b90, sql_errno_arg=1149, message_arg=0x38f8e79 "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use", sqlstate=0xd812cb "42000") at 10.0-serg/sql/sql_error.cc:422
      #8  0x00000000005d34ae in THD::raise_condition (this=0x3b94b90, sql_errno=1149, sqlstate=0xd812cb "42000", level=MYSQL_ERROR::WARN_LEVEL_ERROR, msg=0x38f8e79 "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use") at 10.0-serg/sql/sql_class.cc:1152
      #9  0x00000000005d2c6a in THD::raise_error (this=0x3b94b90, sql_errno=1149) at 10.0-serg/sql/sql_class.cc:1014
      #10 0x0000000000609df4 in handle_bootstrap_impl (thd=0x3b94b90) at 10.0-serg/sql/sql_parse.cc:675
      #11 0x000000000060a1fc in do_handle_bootstrap (thd=0x3b94b90) at 10.0-serg/sql/sql_parse.cc:762
      #12 0x000000000060a186 in handle_bootstrap (arg=0x3b94b90) at 10.0-serg/sql/sql_parse.cc:745
      #13 0x0000000000be040b in pfs_spawn_thread (arg=0x3ad4600) at 10.0-serg/storage/perfschema/pfs.cc:1800
      #14 0x00007fe69c33defc in start_thread (arg=0x7fe68eee8700) at pthread_create.c:304
      #15 0x00007fe69baed59d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
       

      The attached file contains 3 lines.
      1) creation of a table with one VARCHAR(100) field;
      2) big INSERT (191 values);
      3) small INSERT (1 value).

      For a debug build, the test can be anything, e.g. you can run it as

      perl mysql-test-run.pl --mysqld=--init-file=<path to the attached file> main.1st

      The assertion fails while the init file is executed.

      For a non-debug build, the test is one line:

      SELECT COUNT(*) FROM t1;

      On 5.5, it returns 192, as expected. On 10.0, it returns 0.

      10.0-serg
      revision-id: timour@askmonty.org-20121022095529-87ykx0dubnj62c9y
      date: 2012-10-22 12:55:29 +0300
      revno: 3452

      Attachments

        1. init.sql
          20 kB
          Elena Stepanova

        Activity

          People

            serg Sergei Golubchik
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.