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

Problem by MariaDB Update 10.1.32 -> 10.2.19 (Incorrect information in file: .frm)

Details

    Description

      Hi,

      I tried a MariaDB update 10.1.32 -> 10.2.19
      My data was after that not available any more in the database (mysqld.exe: Incorrect information in file: '.\tst01\tbl01.frm')
      I use many databases with tables with virtual columns and subpartitions.

      Environment: WIN 10

      .err file: attached
      mypc.err
      my.ini: attached
      my.ini
      Test Case: sql file to create a database in version 10.1.32 and some Inserts are attached (my.ini also) 1.sql
      I update this to version 10.2.19 - at the end mysql_upgrade_service was without a error (mysql_upgrade_service.MySQL.log attached)
      mysql_upgrade_service.MySQL.log
      The .err file contains already some warnings

      [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
      

      After starting the database, I cannot see the data in the table any more.

      Also if I try mysql_upgrade.exe I will get some errors (mysql_upgrade.exe logs.txt) but the data is still not available
      mysql_upgrade.exe logs.txt

      Attachments

        1. 1.sql
          3 kB
        2. my.ini
          0.8 kB
        3. mypc.err
          15 kB
        4. mysql_upgrade_service.MySQL.log
          3 kB
        5. mysql_upgrade.exe logs.txt
          3 kB
        6. tbl01.tar.gz
          0.7 kB

        Issue Links

          Activity

            elenst Elena Stepanova added a comment - - edited

            Thanks for the report.

            Here is the essential part of the original table:

            DROP TABLE IF EXISTS tbl01;
            CREATE TABLE `tbl01` (
            	`Date` DATETIME(6) NOT NULL,
            	`Data` VARBINARY(2000) NOT NULL,
            	`a` VARCHAR(100) AS (COLUMN_GET(`Data`,1 AS CHAR(100))) VIRTUAL,
            	PRIMARY KEY (`Date`)
            )
            /*!50100 PARTITION BY RANGE (TO_DAYS(`Date`))
            (PARTITION p20181029 VALUES LESS THAN (737361) ENGINE = MyISAM,
             PARTITION p20181128 VALUES LESS THAN (737391) ENGINE = MyISAM)  */;
            

            Reproducible as described (create the table on an old server => start new server => run mysql_upgrade => restart => attempt to use), or by just running the following on the new server:

            CHECK TABLE `tbl01`  FOR UPGRADE;
            FLUSH TABLES;
            SHOW CREATE TABLE tbl01;
            

            10.2 5ec9b88e1 debug

            mysqld: /data/src/10.2/sql/table.cc:2937: Virtual_column_info* unpack_vcol_info_from_frm(THD*, MEM_ROOT*, TABLE*, String*, Virtual_column_info**, bool*): Assertion `vcol->expr == __null' failed.
            181207 16:13:53 [ERROR] mysqld got signal 6 ;
             
            #7  0x00007f86d0d3eee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
            #8  0x000055ac6a5e8d8c in unpack_vcol_info_from_frm (thd=0x7f8668000b00, mem_root=0x7f8668022b58, table=0x7f86680220a0, expr_str=0x7f86d0197130, vcol_ptr=0x7f8668022150, error_reported=0x7f86d01974b1) at /data/src/10.2/sql/table.cc:2937
            #9  0x000055ac6a5e268e in parse_vcol_defs (thd=0x7f8668000b00, mem_root=0x7f8668022b58, table=0x7f86680220a0, error_reported=0x7f86d01974b1) at /data/src/10.2/sql/table.cc:1070
            #10 0x000055ac6a5e9c09 in open_table_from_share (thd=0x7f8668000b00, share=0x7f866801d248, alias=0x7f8668011048 "tbl01", db_stat=33, prgflag=8, ha_open_flags=16, outparam=0x7f86680220a0, is_create_table=false) at /data/src/10.2/sql/table.cc:3202
            #11 0x000055ac6a4715c1 in open_table (thd=0x7f8668000b00, table_list=0x7f8668011050, ot_ctx=0x7f86d0197a00) at /data/src/10.2/sql/sql_base.cc:1923
            #12 0x000055ac6a4741a5 in open_and_process_table (thd=0x7f8668000b00, lex=0x7f8668004618, tables=0x7f8668011050, counter=0x7f86d0197ad4, flags=1024, prelocking_strategy=0x7f86d0197a80, has_prelocking_list=false, ot_ctx=0x7f86d0197a00) at /data/src/10.2/sql/sql_base.cc:3488
            #13 0x000055ac6a475305 in open_tables (thd=0x7f8668000b00, options=..., start=0x7f86d0197ac0, counter=0x7f86d0197ad4, flags=1024, prelocking_strategy=0x7f86d0197a80) at /data/src/10.2/sql/sql_base.cc:4011
            #14 0x000055ac6a4bc711 in open_tables (thd=0x7f8668000b00, tables=0x7f86d0197ac0, counter=0x7f86d0197ad4, flags=1024) at /data/src/10.2/sql/sql_base.h:475
            #15 0x000055ac6a576006 in mysqld_show_create_get_fields (thd=0x7f8668000b00, table_list=0x7f8668011050, field_list=0x7f86d0197d90, buffer=0x7f86d0197db0) at /data/src/10.2/sql/sql_show.cc:1229
            #16 0x000055ac6a5766e2 in mysqld_show_create (thd=0x7f8668000b00, table_list=0x7f8668011050) at /data/src/10.2/sql/sql_show.cc:1324
            #17 0x000055ac6a4e6307 in mysql_execute_command (thd=0x7f8668000b00) at /data/src/10.2/sql/sql_parse.cc:4243
            #18 0x000055ac6a4f21bd in mysql_parse (thd=0x7f8668000b00, rawbuf=0x7f8668010f78 "show create table tbl01", length=23, parser_state=0x7f86d0199250, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:8013
            #19 0x000055ac6a4dfaf5 in dispatch_command (command=COM_QUERY, thd=0x7f8668000b00, packet=0x7f86680191a1 "show create table tbl01", packet_length=23, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1824
            #20 0x000055ac6a4de458 in do_command (thd=0x7f8668000b00) at /data/src/10.2/sql/sql_parse.cc:1378
            #21 0x000055ac6a630bc9 in do_handle_one_connection (connect=0x55ac6e570800) at /data/src/10.2/sql/sql_connect.cc:1335
            #22 0x000055ac6a630956 in handle_one_connection (arg=0x55ac6e570800) at /data/src/10.2/sql/sql_connect.cc:1241
            #23 0x00007f86d27fa494 in start_thread (arg=0x7f86d019a700) at pthread_create.c:333
            #24 0x00007f86d0dfb93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
            

            10.2 5ec9b88e1 non-debug

            MariaDB [test]> show create table tbl01;
            ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
            

            10.3 b6f203984b debug

            #3  <signal handler called>
            #4  0x0000558b826425ab in unpack_vcol_info_from_frm (thd=0x7faef4000b00, mem_root=0x7faef4025528, table=0x7faef4024a60, expr_str=0x7faf4d17c980, vcol_ptr=0x7faef4026f31, error_reported=0x7faf4d17cd01) at /data/src/10.3/sql/table.cc:3045
            #5  0x0000558b8263b6ff in parse_vcol_defs (thd=0x7faef4000b00, mem_root=0x7faef4025528, table=0x7faef4024a60, error_reported=0x7faf4d17cd01) at /data/src/10.3/sql/table.cc:1072
            #6  0x0000558b826435d6 in open_table_from_share (thd=0x7faef4000b00, share=0x7faef40200a8, alias=0x7faef4013928, db_stat=33, prgflag=8, ha_open_flags=16, outparam=0x7faef4024a60, is_create_table=false, partitions_to_open=0x0) at /data/src/10.3/sql/table.cc:3336
            #7  0x0000558b8249f0c9 in open_table (thd=0x7faef4000b00, table_list=0x7faef40138e0, ot_ctx=0x7faf4d17d260) at /data/src/10.3/sql/sql_base.cc:1975
            #8  0x0000558b824a2116 in open_and_process_table (thd=0x7faef4000b00, lex=0x7faef40048e8, tables=0x7faef40138e0, counter=0x7faf4d17d334, flags=1024, prelocking_strategy=0x7faf4d17d2e0, has_prelocking_list=false, ot_ctx=0x7faf4d17d260) at /data/src/10.3/sql/sql_base.cc:3596
            #9  0x0000558b824a3312 in open_tables (thd=0x7faef4000b00, options=..., start=0x7faf4d17d320, counter=0x7faf4d17d334, flags=1024, prelocking_strategy=0x7faf4d17d2e0) at /data/src/10.3/sql/sql_base.cc:4121
            #10 0x0000558b824ee3c3 in open_tables (thd=0x7faef4000b00, tables=0x7faf4d17d320, counter=0x7faf4d17d334, flags=1024) at /data/src/10.3/sql/sql_base.h:471
            #11 0x0000558b825c631d in mysqld_show_create_get_fields (thd=0x7faef4000b00, table_list=0x7faef40138e0, field_list=0x7faf4d17d5f0, buffer=0x7faf4d17d610) at /data/src/10.3/sql/sql_show.cc:1261
            #12 0x0000558b825c6ab3 in mysqld_show_create (thd=0x7faef4000b00, table_list=0x7faef40138e0) at /data/src/10.3/sql/sql_show.cc:1366
            #13 0x0000558b82531fef in mysql_execute_command (thd=0x7faef4000b00) at /data/src/10.3/sql/sql_parse.cc:4532
            #14 0x0000558b8253d7cb in mysql_parse (thd=0x7faef4000b00, rawbuf=0x7faef4013808 "show create table tbl01", length=23, parser_state=0x7faf4d17f640, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8091
            #15 0x0000558b8252a97f in dispatch_command (command=COM_QUERY, thd=0x7faef4000b00, packet=0x7faef401ba31 "show create table tbl01", packet_length=23, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1850
            #16 0x0000558b825293a3 in do_command (thd=0x7faef4000b00) at /data/src/10.3/sql/sql_parse.cc:1395
            #17 0x0000558b826910ba in do_handle_one_connection (connect=0x558b865397f0) at /data/src/10.3/sql/sql_connect.cc:1402
            #18 0x0000558b82690e3e in handle_one_connection (arg=0x558b865397f0) at /data/src/10.3/sql/sql_connect.cc:1308
            #19 0x00007faf66420494 in start_thread (arg=0x7faf4d180700) at pthread_create.c:333
            #20 0x00007faf64a2193f in clone () from /lib/x86_64-linux-gnu/libc.so.6
            

            Might be related to MDEV-17199.
            The table created on current 10.1 (pre-10.1.38, 328d7779b) is attached. I have changed it to MyISAM for simplicity, it is not important for the issue.

            elenst Elena Stepanova added a comment - - edited Thanks for the report. Here is the essential part of the original table: DROP TABLE IF EXISTS tbl01; CREATE TABLE `tbl01` ( ` Date ` DATETIME(6) NOT NULL , `Data` VARBINARY(2000) NOT NULL , `a` VARCHAR (100) AS (COLUMN_GET(`Data`,1 AS CHAR (100))) VIRTUAL, PRIMARY KEY (` Date `) ) /*!50100 PARTITION BY RANGE (TO_DAYS(`Date`)) (PARTITION p20181029 VALUES LESS THAN (737361) ENGINE = MyISAM, PARTITION p20181128 VALUES LESS THAN (737391) ENGINE = MyISAM) */ ; Reproducible as described (create the table on an old server => start new server => run mysql_upgrade => restart => attempt to use), or by just running the following on the new server: CHECK TABLE `tbl01` FOR UPGRADE; FLUSH TABLES; SHOW CREATE TABLE tbl01; 10.2 5ec9b88e1 debug mysqld: /data/src/10.2/sql/table.cc:2937: Virtual_column_info* unpack_vcol_info_from_frm(THD*, MEM_ROOT*, TABLE*, String*, Virtual_column_info**, bool*): Assertion `vcol->expr == __null' failed. 181207 16:13:53 [ERROR] mysqld got signal 6 ;   #7 0x00007f86d0d3eee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #8 0x000055ac6a5e8d8c in unpack_vcol_info_from_frm (thd=0x7f8668000b00, mem_root=0x7f8668022b58, table=0x7f86680220a0, expr_str=0x7f86d0197130, vcol_ptr=0x7f8668022150, error_reported=0x7f86d01974b1) at /data/src/10.2/sql/table.cc:2937 #9 0x000055ac6a5e268e in parse_vcol_defs (thd=0x7f8668000b00, mem_root=0x7f8668022b58, table=0x7f86680220a0, error_reported=0x7f86d01974b1) at /data/src/10.2/sql/table.cc:1070 #10 0x000055ac6a5e9c09 in open_table_from_share (thd=0x7f8668000b00, share=0x7f866801d248, alias=0x7f8668011048 "tbl01", db_stat=33, prgflag=8, ha_open_flags=16, outparam=0x7f86680220a0, is_create_table=false) at /data/src/10.2/sql/table.cc:3202 #11 0x000055ac6a4715c1 in open_table (thd=0x7f8668000b00, table_list=0x7f8668011050, ot_ctx=0x7f86d0197a00) at /data/src/10.2/sql/sql_base.cc:1923 #12 0x000055ac6a4741a5 in open_and_process_table (thd=0x7f8668000b00, lex=0x7f8668004618, tables=0x7f8668011050, counter=0x7f86d0197ad4, flags=1024, prelocking_strategy=0x7f86d0197a80, has_prelocking_list=false, ot_ctx=0x7f86d0197a00) at /data/src/10.2/sql/sql_base.cc:3488 #13 0x000055ac6a475305 in open_tables (thd=0x7f8668000b00, options=..., start=0x7f86d0197ac0, counter=0x7f86d0197ad4, flags=1024, prelocking_strategy=0x7f86d0197a80) at /data/src/10.2/sql/sql_base.cc:4011 #14 0x000055ac6a4bc711 in open_tables (thd=0x7f8668000b00, tables=0x7f86d0197ac0, counter=0x7f86d0197ad4, flags=1024) at /data/src/10.2/sql/sql_base.h:475 #15 0x000055ac6a576006 in mysqld_show_create_get_fields (thd=0x7f8668000b00, table_list=0x7f8668011050, field_list=0x7f86d0197d90, buffer=0x7f86d0197db0) at /data/src/10.2/sql/sql_show.cc:1229 #16 0x000055ac6a5766e2 in mysqld_show_create (thd=0x7f8668000b00, table_list=0x7f8668011050) at /data/src/10.2/sql/sql_show.cc:1324 #17 0x000055ac6a4e6307 in mysql_execute_command (thd=0x7f8668000b00) at /data/src/10.2/sql/sql_parse.cc:4243 #18 0x000055ac6a4f21bd in mysql_parse (thd=0x7f8668000b00, rawbuf=0x7f8668010f78 "show create table tbl01", length=23, parser_state=0x7f86d0199250, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:8013 #19 0x000055ac6a4dfaf5 in dispatch_command (command=COM_QUERY, thd=0x7f8668000b00, packet=0x7f86680191a1 "show create table tbl01", packet_length=23, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1824 #20 0x000055ac6a4de458 in do_command (thd=0x7f8668000b00) at /data/src/10.2/sql/sql_parse.cc:1378 #21 0x000055ac6a630bc9 in do_handle_one_connection (connect=0x55ac6e570800) at /data/src/10.2/sql/sql_connect.cc:1335 #22 0x000055ac6a630956 in handle_one_connection (arg=0x55ac6e570800) at /data/src/10.2/sql/sql_connect.cc:1241 #23 0x00007f86d27fa494 in start_thread (arg=0x7f86d019a700) at pthread_create.c:333 #24 0x00007f86d0dfb93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 10.2 5ec9b88e1 non-debug MariaDB [test]> show create table tbl01; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 10.3 b6f203984b debug #3 <signal handler called> #4 0x0000558b826425ab in unpack_vcol_info_from_frm (thd=0x7faef4000b00, mem_root=0x7faef4025528, table=0x7faef4024a60, expr_str=0x7faf4d17c980, vcol_ptr=0x7faef4026f31, error_reported=0x7faf4d17cd01) at /data/src/10.3/sql/table.cc:3045 #5 0x0000558b8263b6ff in parse_vcol_defs (thd=0x7faef4000b00, mem_root=0x7faef4025528, table=0x7faef4024a60, error_reported=0x7faf4d17cd01) at /data/src/10.3/sql/table.cc:1072 #6 0x0000558b826435d6 in open_table_from_share (thd=0x7faef4000b00, share=0x7faef40200a8, alias=0x7faef4013928, db_stat=33, prgflag=8, ha_open_flags=16, outparam=0x7faef4024a60, is_create_table=false, partitions_to_open=0x0) at /data/src/10.3/sql/table.cc:3336 #7 0x0000558b8249f0c9 in open_table (thd=0x7faef4000b00, table_list=0x7faef40138e0, ot_ctx=0x7faf4d17d260) at /data/src/10.3/sql/sql_base.cc:1975 #8 0x0000558b824a2116 in open_and_process_table (thd=0x7faef4000b00, lex=0x7faef40048e8, tables=0x7faef40138e0, counter=0x7faf4d17d334, flags=1024, prelocking_strategy=0x7faf4d17d2e0, has_prelocking_list=false, ot_ctx=0x7faf4d17d260) at /data/src/10.3/sql/sql_base.cc:3596 #9 0x0000558b824a3312 in open_tables (thd=0x7faef4000b00, options=..., start=0x7faf4d17d320, counter=0x7faf4d17d334, flags=1024, prelocking_strategy=0x7faf4d17d2e0) at /data/src/10.3/sql/sql_base.cc:4121 #10 0x0000558b824ee3c3 in open_tables (thd=0x7faef4000b00, tables=0x7faf4d17d320, counter=0x7faf4d17d334, flags=1024) at /data/src/10.3/sql/sql_base.h:471 #11 0x0000558b825c631d in mysqld_show_create_get_fields (thd=0x7faef4000b00, table_list=0x7faef40138e0, field_list=0x7faf4d17d5f0, buffer=0x7faf4d17d610) at /data/src/10.3/sql/sql_show.cc:1261 #12 0x0000558b825c6ab3 in mysqld_show_create (thd=0x7faef4000b00, table_list=0x7faef40138e0) at /data/src/10.3/sql/sql_show.cc:1366 #13 0x0000558b82531fef in mysql_execute_command (thd=0x7faef4000b00) at /data/src/10.3/sql/sql_parse.cc:4532 #14 0x0000558b8253d7cb in mysql_parse (thd=0x7faef4000b00, rawbuf=0x7faef4013808 "show create table tbl01", length=23, parser_state=0x7faf4d17f640, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8091 #15 0x0000558b8252a97f in dispatch_command (command=COM_QUERY, thd=0x7faef4000b00, packet=0x7faef401ba31 "show create table tbl01", packet_length=23, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1850 #16 0x0000558b825293a3 in do_command (thd=0x7faef4000b00) at /data/src/10.3/sql/sql_parse.cc:1395 #17 0x0000558b826910ba in do_handle_one_connection (connect=0x558b865397f0) at /data/src/10.3/sql/sql_connect.cc:1402 #18 0x0000558b82690e3e in handle_one_connection (arg=0x558b865397f0) at /data/src/10.3/sql/sql_connect.cc:1308 #19 0x00007faf66420494 in start_thread (arg=0x7faf4d180700) at pthread_create.c:333 #20 0x00007faf64a2193f in clone () from /lib/x86_64-linux-gnu/libc.so.6 Might be related to MDEV-17199 . The table created on current 10.1 (pre-10.1.38, 328d7779b) is attached. I have changed it to MyISAM for simplicity, it is not important for the issue.

            People

              serg Sergei Golubchik
              IulianA Andrei Iulian
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.