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

Assertion `(m_ci->state & 32) || m_with_collate' failed in Lex_exact_charset_opt_extended_collate::Lex_exact_charset_opt_extended_collate on SET NAMES

Details

    Description

      SET GLOBAL character_set_client=2;
      SET NAMES DEFAULT;
      

      Leads to:

      10.10.0 081a284712bb661349e2e3802077b12211cede3e (Debug)

      mysqld: /test/10.10_dbg/sql/lex_charset.h:190: Lex_exact_charset_opt_extended_collate::Lex_exact_charset_opt_extended_collate(CHARSET_INFO*, bool): Assertion `(m_ci->state & 32) || m_with_collate' failed.
      

      10.10.0 081a284712bb661349e2e3802077b12211cede3e (Debug)

      Core was generated by `/test/MD310522-mariadb-10.10.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      [Current thread is 1 (Thread 0x14a5d4fb1700 (LWP 3319147))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000014a5edb0b859 in __GI_abort () at abort.c:79
      #2  0x000014a5edb0b729 in __assert_fail_base (fmt=0x14a5edca1588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55b6d5bc0ac0 "(m_ci->state & 32) || m_with_collate", file=0x55b6d5bc0a30 "/test/10.10_dbg/sql/lex_charset.h", line=190, function=<optimized out>) at assert.c:92
      #3  0x000014a5edb1cfd6 in __GI___assert_fail (assertion=assertion@entry=0x55b6d5bc0ac0 "(m_ci->state & 32) || m_with_collate", file=file@entry=0x55b6d5bc0a30 "/test/10.10_dbg/sql/lex_charset.h", line=line@entry=190, function=function@entry=0x55b6d5bc0a58 "Lex_exact_charset_opt_extended_collate::Lex_exact_charset_opt_extended_collate(CHARSET_INFO*, bool)") at assert.c:101
      #4  0x000055b6d5255bd4 in Lex_exact_charset_opt_extended_collate::Lex_exact_charset_opt_extended_collate (this=0x14a5d4faf590, ci=<optimized out>, with_collate=<optimized out>) at /test/10.10_dbg/sql/lex_charset.h:190
      #5  0x000055b6d524b383 in MYSQLparse (thd=thd@entry=0x14a594000db8) at /test/10.10_dbg/sql/sql_yacc.yy:16579
      #6  0x000055b6d4fd6b39 in parse_sql (thd=thd@entry=0x14a594000db8, parser_state=parser_state@entry=0x14a5d4fb0470, creation_ctx=creation_ctx@entry=0x0, do_pfs_digest=do_pfs_digest@entry=true) at /test/10.10_dbg/sql/sql_parse.cc:10389
      #7  0x000055b6d4fd1d48 in mysql_parse (thd=thd@entry=0x14a594000db8, rawbuf=<optimized out>, length=17, parser_state=parser_state@entry=0x14a5d4fb0470) at /test/10.10_dbg/sql/sql_parse.cc:7988
      #8  0x000055b6d4fdf422 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14a594000db8, packet=packet@entry=0x14a59400b6d9 "SET NAMES DEFAULT", packet_length=packet_length@entry=17, blocking=blocking@entry=true) at /test/10.10_dbg/sql/sql_class.h:1364
      #9  0x000055b6d4fe1b2c in do_command (thd=0x14a594000db8, blocking=blocking@entry=true) at /test/10.10_dbg/sql/sql_parse.cc:1407
      #10 0x000055b6d51413c0 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55b6d8bb5ef8, put_in_cache=put_in_cache@entry=true) at /test/10.10_dbg/sql/sql_connect.cc:1418
      #11 0x000055b6d51418c9 in handle_one_connection (arg=0x55b6d8bb5ef8) at /test/10.10_dbg/sql/sql_connect.cc:1312
      #12 0x000014a5ee01c609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #13 0x000014a5edc08133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.9.2 (dbg), 10.10.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.3.36 (dbg), 10.3.36 (opt), 10.4.26 (dbg), 10.4.26 (opt), 10.5.17 (dbg), 10.5.17 (opt), 10.6.9 (dbg), 10.6.9 (opt), 10.7.5 (dbg), 10.7.5 (opt), 10.8.4 (dbg), 10.8.4 (opt), 10.9.2 (opt), 10.10.0 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.38 (dbg), 5.7.38 (opt), 8.0.29 (dbg), 8.0.29 (opt)

      Attachments

        Issue Links

          Activity

            Roel Roel Van de Paar added a comment - - edited

            Different stack with this testcase

            SET GLOBAL character_set_client=2;
            SET sql_mode=ORACLE;
            SET NAMES DEFAULT;
            

            Leads to:

            10.10.0 081a284712bb661349e2e3802077b12211cede3e (Debug)

            mysqld: /test/10.10_dbg/sql/lex_charset.h:190: Lex_exact_charset_opt_extended_collate::Lex_exact_charset_opt_extended_collate(CHARSET_INFO*, bool): Assertion `(m_ci->state & 32) || m_with_collate' failed.
            

            10.10.0 081a284712bb661349e2e3802077b12211cede3e (Debug)

            Core was generated by `/test/MD310522-mariadb-10.10.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
            Program terminated with signal SIGABRT, Aborted.
            #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            [Current thread is 1 (Thread 0x14bc34214700 (LWP 1309239))]
            (gdb) bt
            #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            #1  0x000014bc603a0859 in __GI_abort () at abort.c:79
            #2  0x000014bc603a0729 in __assert_fail_base (fmt=0x14bc60536588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5627ac2a4ac0 "(m_ci->state & 32) || m_with_collate", file=0x5627ac2a4a30 "/test/10.10_dbg/sql/lex_charset.h", line=190, function=<optimized out>) at assert.c:92
            #3  0x000014bc603b1fd6 in __GI___assert_fail (assertion=assertion@entry=0x5627ac2a4ac0 "(m_ci->state & 32) || m_with_collate", file=file@entry=0x5627ac2a4a30 "/test/10.10_dbg/sql/lex_charset.h", line=line@entry=190, function=function@entry=0x5627ac2a4a58 "Lex_exact_charset_opt_extended_collate::Lex_exact_charset_opt_extended_collate(CHARSET_INFO*, bool)") at assert.c:101
            #4  0x00005627ab939bd4 in Lex_exact_charset_opt_extended_collate::Lex_exact_charset_opt_extended_collate (this=0x14bc34212590, ci=<optimized out>, with_collate=<optimized out>) at /test/10.10_dbg/sql/lex_charset.h:190
            #5  0x00005627ab95e51f in ORAparse (thd=thd@entry=0x14bc10000db8) at /test/10.10_dbg/sql/sql_yacc.yy:16579
            #6  0x00005627ab6baa18 in parse_sql (thd=thd@entry=0x14bc10000db8, parser_state=parser_state@entry=0x14bc34213470, creation_ctx=creation_ctx@entry=0x0, do_pfs_digest=do_pfs_digest@entry=true) at /test/10.10_dbg/sql/sql_parse.cc:10426
            #7  0x00005627ab6b5d48 in mysql_parse (thd=thd@entry=0x14bc10000db8, rawbuf=<optimized out>, length=17, parser_state=parser_state@entry=0x14bc34213470) at /test/10.10_dbg/sql/sql_parse.cc:7988
            #8  0x00005627ab6c3422 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14bc10000db8, packet=packet@entry=0x14bc1000b6d9 "SET NAMES DEFAULT", packet_length=packet_length@entry=17, blocking=blocking@entry=true) at /test/10.10_dbg/sql/sql_class.h:1364
            #9  0x00005627ab6c5b2c in do_command (thd=0x14bc10000db8, blocking=blocking@entry=true) at /test/10.10_dbg/sql/sql_parse.cc:1407
            #10 0x00005627ab8253c0 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5627aecb6b98, put_in_cache=put_in_cache@entry=true) at /test/10.10_dbg/sql/sql_connect.cc:1418
            #11 0x00005627ab8258c9 in handle_one_connection (arg=0x5627aecb6b98) at /test/10.10_dbg/sql/sql_connect.cc:1312
            #12 0x000014bc608b1609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #13 0x000014bc6049d133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            Bug confirmed present in:
            MariaDB: 10.9.2 (dbg), 10.10.0 (dbg)

            Bug (or feature/syntax) confirmed not present in:
            MariaDB: 10.3.36 (dbg), 10.3.36 (opt), 10.4.26 (dbg), 10.4.26 (opt), 10.5.17 (dbg), 10.5.17 (opt), 10.6.9 (dbg), 10.6.9 (opt), 10.7.5 (dbg), 10.7.5 (opt), 10.8.4 (dbg), 10.8.4 (opt), 10.9.2 (opt), 10.10.0 (opt)
            MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.38 (dbg), 5.7.38 (opt), 8.0.29 (dbg), 8.0.29 (opt)

            (m_ci->state & 32) || m_with_collate|SIGABRT|Lex_exact_charset_opt_extended_collate::Lex_exact_charset_opt_extended_collate|ORAparse|parse_sql|mysql_parse
            

            versus (Original testcase):

            (m_ci->state & 32) || m_with_collate|SIGABRT|Lex_exact_charset_opt_extended_collate::Lex_exact_charset_opt_extended_collate|MYSQLparse|parse_sql|mysql_parse
            

            Roel Roel Van de Paar added a comment - - edited Different stack with this testcase SET GLOBAL character_set_client=2; SET sql_mode=ORACLE; SET NAMES DEFAULT ; Leads to: 10.10.0 081a284712bb661349e2e3802077b12211cede3e (Debug) mysqld: /test/10.10_dbg/sql/lex_charset.h:190: Lex_exact_charset_opt_extended_collate::Lex_exact_charset_opt_extended_collate(CHARSET_INFO*, bool): Assertion `(m_ci->state & 32) || m_with_collate' failed. 10.10.0 081a284712bb661349e2e3802077b12211cede3e (Debug) Core was generated by `/test/MD310522-mariadb-10.10.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core'. Program terminated with signal SIGABRT, Aborted. #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 [Current thread is 1 (Thread 0x14bc34214700 (LWP 1309239))] (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x000014bc603a0859 in __GI_abort () at abort.c:79 #2 0x000014bc603a0729 in __assert_fail_base (fmt=0x14bc60536588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5627ac2a4ac0 "(m_ci->state & 32) || m_with_collate", file=0x5627ac2a4a30 "/test/10.10_dbg/sql/lex_charset.h", line=190, function=<optimized out>) at assert.c:92 #3 0x000014bc603b1fd6 in __GI___assert_fail (assertion=assertion@entry=0x5627ac2a4ac0 "(m_ci->state & 32) || m_with_collate", file=file@entry=0x5627ac2a4a30 "/test/10.10_dbg/sql/lex_charset.h", line=line@entry=190, function=function@entry=0x5627ac2a4a58 "Lex_exact_charset_opt_extended_collate::Lex_exact_charset_opt_extended_collate(CHARSET_INFO*, bool)") at assert.c:101 #4 0x00005627ab939bd4 in Lex_exact_charset_opt_extended_collate::Lex_exact_charset_opt_extended_collate (this=0x14bc34212590, ci=<optimized out>, with_collate=<optimized out>) at /test/10.10_dbg/sql/lex_charset.h:190 #5 0x00005627ab95e51f in ORAparse (thd=thd@entry=0x14bc10000db8) at /test/10.10_dbg/sql/sql_yacc.yy:16579 #6 0x00005627ab6baa18 in parse_sql (thd=thd@entry=0x14bc10000db8, parser_state=parser_state@entry=0x14bc34213470, creation_ctx=creation_ctx@entry=0x0, do_pfs_digest=do_pfs_digest@entry=true) at /test/10.10_dbg/sql/sql_parse.cc:10426 #7 0x00005627ab6b5d48 in mysql_parse (thd=thd@entry=0x14bc10000db8, rawbuf=<optimized out>, length=17, parser_state=parser_state@entry=0x14bc34213470) at /test/10.10_dbg/sql/sql_parse.cc:7988 #8 0x00005627ab6c3422 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14bc10000db8, packet=packet@entry=0x14bc1000b6d9 "SET NAMES DEFAULT", packet_length=packet_length@entry=17, blocking=blocking@entry=true) at /test/10.10_dbg/sql/sql_class.h:1364 #9 0x00005627ab6c5b2c in do_command (thd=0x14bc10000db8, blocking=blocking@entry=true) at /test/10.10_dbg/sql/sql_parse.cc:1407 #10 0x00005627ab8253c0 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5627aecb6b98, put_in_cache=put_in_cache@entry=true) at /test/10.10_dbg/sql/sql_connect.cc:1418 #11 0x00005627ab8258c9 in handle_one_connection (arg=0x5627aecb6b98) at /test/10.10_dbg/sql/sql_connect.cc:1312 #12 0x000014bc608b1609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #13 0x000014bc6049d133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Bug confirmed present in: MariaDB: 10.9.2 (dbg), 10.10.0 (dbg) Bug (or feature/syntax) confirmed not present in: MariaDB: 10.3.36 (dbg), 10.3.36 (opt), 10.4.26 (dbg), 10.4.26 (opt), 10.5.17 (dbg), 10.5.17 (opt), 10.6.9 (dbg), 10.6.9 (opt), 10.7.5 (dbg), 10.7.5 (opt), 10.8.4 (dbg), 10.8.4 (opt), 10.9.2 (opt), 10.10.0 (opt) MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.38 (dbg), 5.7.38 (opt), 8.0.29 (dbg), 8.0.29 (opt) (m_ci->state & 32) || m_with_collate|SIGABRT|Lex_exact_charset_opt_extended_collate::Lex_exact_charset_opt_extended_collate|ORAparse|parse_sql|mysql_parse versus (Original testcase): (m_ci->state & 32) || m_with_collate|SIGABRT|Lex_exact_charset_opt_extended_collate::Lex_exact_charset_opt_extended_collate|MYSQLparse|parse_sql|mysql_parse

            People

              bar Alexander Barkov
              Roel Roel Van de Paar
              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.