[MDEV-18084] Server crashes in row_upd_changes_some_index_ord_field_binary or Assertion `pos < index->n_def' failed in dict_index_get_nth_field upon UPDATE after upgrade from 10.1/10.0 Created: 2018-12-26  Updated: 2019-04-01  Resolved: 2019-03-25

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB, Virtual Columns
Affects Version/s: 10.2, 10.3, 10.4
Fix Version/s: 10.2.23, 10.3.14, 10.4.4

Type: Bug Priority: Critical
Reporter: Elena Stepanova Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: affects-tests

Attachments: File data.tar.gz    
Issue Links:
Blocks
blocks MDEV-14046 Allow ALGORITHM=INPLACE for 10.1 tabl... Closed
Problem/Incident
is caused by MDEV-5800 indexes on virtual (not materialized)... Closed
is caused by MDEV-17199 Assertion `pos < table->n_v_def' fail... Closed
Relates
relates to MDEV-14023 10.1 InnoDB tables with virtual colum... Closed
relates to MDEV-18085 Assertion `!col->mbmaxlen || len >= c... Closed
relates to MDEV-18086 Assertion `len <= col->len || ((col->... Closed
relates to MDEV-18087 Server crashes in mach_read_from_n_li... Closed
relates to MDEV-18090 Assertion `dict_table_get_n_cols(old_... Closed
relates to MDEV-18047 Crash in dict_foreign_qualify_index o... Confirmed

 Description   

10.2 debug 734029fa79

mysqld: /data/src/10.2/storage/innobase/include/dict0dict.ic:1064: dict_field_t* dict_index_get_nth_field(const dict_index_t*, ulint): Assertion `pos < index->n_def' failed.
181226 21:54:35 [ERROR] mysqld got signal 6 ;
 
#7  0x00007fd23a225ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x000055ced64d106a in dict_index_get_nth_field (index=0x7fd1d4028868, pos=65535) at /data/src/10.2/storage/innobase/include/dict0dict.ic:1064
#9  0x000055ced64d7039 in row_upd_changes_some_index_ord_field_binary (table=0x7fd1d400a448, update=0x7fd1d4020240) at /data/src/10.2/storage/innobase/row/row0upd.cc:1944
#10 0x000055ced64da870 in row_upd (node=0x7fd1d4020128, thr=0x7fd1d4020430) at /data/src/10.2/storage/innobase/row/row0upd.cc:3267
#11 0x000055ced64dadab in row_upd_step (thr=0x7fd1d4020430) at /data/src/10.2/storage/innobase/row/row0upd.cc:3425
#12 0x000055ced6481437 in row_update_for_mysql (prebuilt=0x7fd1d401f958) at /data/src/10.2/storage/innobase/row/row0mysql.cc:1830
#13 0x000055ced6347786 in ha_innobase::update_row (this=0x7fd1d401e6b8, old_row=0x7fd1d400c180 "\377", new_row=0x7fd1d400c170 "\377") at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:9000
#14 0x000055ced603ba17 in handler::ha_update_row (this=0x7fd1d401e6b8, old_data=0x7fd1d400c180 "\377", new_data=0x7fd1d400c170 "\377") at /data/src/10.2/sql/handler.cc:5993
#15 0x000055ced5ea2458 in mysql_update (thd=0x7fd1d4000b00, table_list=0x7fd1d40111b8, fields=..., values=..., conds=0x7fd1d4011d00, order_num=0, order=0x0, limit=18446744073709551615, handle_duplicates=DUP_ERROR, ignore=false, found_return=0x7fd23810c8b0, updated_return=0x7fd23810c960) at /data/src/10.2/sql/sql_update.cc:809
#16 0x000055ced5db5cab in mysql_execute_command (thd=0x7fd1d4000b00) at /data/src/10.2/sql/sql_parse.cc:4292
#17 0x000055ced5dc17f7 in mysql_parse (thd=0x7fd1d4000b00, rawbuf=0x7fd1d40110c0 "UPDATE t1 SET pk = pk + 1 WHERE pk = 1", length=38, parser_state=0x7fd23810d250, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:8014
#18 0x000055ced5daf12f in dispatch_command (command=COM_QUERY, thd=0x7fd1d4000b00, packet=0x7fd1d40191a1 "UPDATE t1 SET pk = pk + 1 WHERE pk = 1", packet_length=38, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1825
#19 0x000055ced5dada92 in do_command (thd=0x7fd1d4000b00) at /data/src/10.2/sql/sql_parse.cc:1379
#20 0x000055ced5f00569 in do_handle_one_connection (connect=0x55ced9000580) at /data/src/10.2/sql/sql_connect.cc:1335
#21 0x000055ced5f002f6 in handle_one_connection (arg=0x55ced9000580) at /data/src/10.2/sql/sql_connect.cc:1241
#22 0x00007fd23bce1494 in start_thread (arg=0x7fd23810e700) at pthread_create.c:333
#23 0x00007fd23a2e293f in clone () from /lib/x86_64-linux-gnu/libc.so.6

10.2 non-debug 734029fa79

#2  <signal handler called>
#3  row_upd_changes_some_index_ord_field_binary (table=<optimized out>, update=<optimized out>) at /data/src/10.2/storage/innobase/row/row0upd.cc:1943
#4  0x00005611a4dd4128 in row_upd (thr=0x7f39c001a048, node=0x7f39c0019d50) at /data/src/10.2/storage/innobase/row/row0upd.cc:3267
#5  row_upd_step (thr=thr@entry=0x7f39c001a048) at /data/src/10.2/storage/innobase/row/row0upd.cc:3425
#6  0x00005611a4da4584 in row_update_for_mysql (prebuilt=0x7f39c00195a0) at /data/src/10.2/storage/innobase/row/row0mysql.cc:1830
#7  0x00005611a4ceb629 in ha_innobase::update_row (this=<optimized out>, old_row=<optimized out>, new_row=<optimized out>) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:9000
#8  0x00005611a4ad3543 in handler::ha_update_row (this=0x7f39c0018400, old_data=0x7f39c0006148 "\377", new_data=0x7f39c0006138 "\377") at /data/src/10.2/sql/handler.cc:5993
#9  0x00005611a49d351d in mysql_update (thd=0x7f39c00009a8, table_list=0x7f39c000f230, fields=..., values=..., conds=0x7f39c000fd78, order_num=<optimized out>, order=<optimized out>, limit=18446744073709551615, handle_duplicates=DUP_ERROR, ignore=false, found_return=0x7f3a257f9c20, updated_return=0x7f3a257f9cd0) at /data/src/10.2/sql/sql_update.cc:809
#10 0x00005611a4934568 in mysql_execute_command (thd=0x7f39c00009a8) at /data/src/10.2/sql/sql_parse.cc:4292
#11 0x00005611a493b48a in mysql_parse (thd=0x7f39c00009a8, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.2/sql/sql_parse.cc:8014
#12 0x00005611a493f004 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f39c00009a8, packet=packet@entry=0x7f39c0006ce9 "UPDATE t1 SET pk = pk + 1 WHERE pk = 1", packet_length=packet_length@entry=38, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.2/sql/sql_parse.cc:1825
#13 0x00005611a493fa39 in do_command (thd=0x7f39c00009a8) at /data/src/10.2/sql/sql_parse.cc:1379
#14 0x00005611a4a08e34 in do_handle_one_connection (connect=connect@entry=0x5611a8851338) at /data/src/10.2/sql/sql_connect.cc:1335
#15 0x00005611a4a08fd4 in handle_one_connection (arg=0x5611a8851338) at /data/src/10.2/sql/sql_connect.cc:1241
#16 0x00007f3a28fac494 in start_thread (arg=0x7f3a257fc700) at pthread_create.c:333
#17 0x00007f3a275ad93f in clone () from /lib/x86_64-linux-gnu/libc.so.6

On 10.3 and 10.4 the assertion failure is slightly different:

10.3 debug 812bb1303c

mysqld: /data/src/10.3/storage/innobase/include/dict0dict.ic:485: dict_v_col_t* dict_table_get_nth_v_col(const dict_table_t*, ulint): Assertion `pos < table->n_v_def' failed.
181226 22:31:39 [ERROR] mysqld got signal 6 ;
 
#7  0x00007fb19cf91ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x000055648ae6c494 in dict_table_get_nth_v_col (table=0x7fb12c028be8, pos=0) at /data/src/10.3/storage/innobase/include/dict0dict.ic:485
#9  0x000055648ae79cac in build_template_field (prebuilt=0x7fb12c2af698, clust_index=0x7fb12c296368, index=0x7fb12c296368, table=0x7fb12c3655f0, field=0x7fb12c34e900, i=1, v_no=0) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:7362
#10 0x000055648ae7b9e8 in ha_innobase::build_template (this=0x7fb12c2fa7e8, whole_row=true) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:7863
#11 0x000055648ae7f52f in ha_innobase::change_active_index (this=0x7fb12c2fa7e8, keynr=0) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:9517
#12 0x000055648ae7e6e8 in ha_innobase::index_init (this=0x7fb12c2fa7e8, keynr=0) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:9073
#13 0x000055648a7c5c45 in handler::ha_index_init (this=0x7fb12c2fa7e8, idx=0, sorted=true) at /data/src/10.3/sql/handler.h:3054
#14 0x000055648accc422 in QUICK_RANGE_SELECT::reset (this=0x7fb12c3bb980) at /data/src/10.3/sql/opt_range.cc:11405
#15 0x000055648a959b62 in mysql_update (thd=0x7fb12c000b00, table_list=0x7fb12c013a48, fields=..., values=..., conds=0x7fb12c014610, order_num=0, order=0x0, limit=18446744073709551615, handle_duplicates=DUP_ERROR, ignore=false, found_return=0x7fb19c04c740, updated_return=0x7fb19c04c800) at /data/src/10.3/sql/sql_update.cc:816
#16 0x000055648a861aad in mysql_execute_command (thd=0x7fb12c000b00) at /data/src/10.3/sql/sql_parse.cc:4581
#17 0x000055648a86cec9 in mysql_parse (thd=0x7fb12c000b00, rawbuf=0x7fb12c013950 "UPDATE t1 SET pk = pk + 1 WHERE pk = 1", length=38, parser_state=0x7fb19c04d640, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8092
#18 0x000055648a85a07d in dispatch_command (command=COM_QUERY, thd=0x7fb12c000b00, packet=0x7fb12c01ba31 "UPDATE t1 SET pk = pk + 1 WHERE pk = 1", packet_length=38, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1851
#19 0x000055648a858aa1 in do_command (thd=0x7fb12c000b00) at /data/src/10.3/sql/sql_parse.cc:1396
#20 0x000055648a9c0ab0 in do_handle_one_connection (connect=0x55648f4d9130) at /data/src/10.3/sql/sql_connect.cc:1402
#21 0x000055648a9c0834 in handle_one_connection (arg=0x55648f4d9130) at /data/src/10.3/sql/sql_connect.cc:1308
#22 0x00007fb19ea4d494 in start_thread (arg=0x7fb19c04e700) at pthread_create.c:333
#23 0x00007fb19d04e93f in clone () from /lib/x86_64-linux-gnu/libc.so.6

To reproduce:

  • start 10.1 server with all defaults (current 10.1 9ad1663f78 or 10.1.37 will do, I didn't check other versions);
  • run

    CREATE TABLE t1 (t TIMESTAMP NULL, v TIMESTAMP AS (t) VIRTUAL, pk INT AUTO_INCREMENT, PRIMARY KEY(pk));
    INSERT INTO t1 () VALUES ();
    

  • shutdown server normally;
  • start 10.2+ server with all defaults on the same datadir;
  • run mysql_upgrade (optionally, it doesn't affect the outcome);
  • run

    UPDATE t1 SET pk = pk + 1 WHERE pk = 1
    

The datadir pre-created on current 10.1 as described is attached.

Same upon upgrade from 10.0.



 Comments   
Comment by Elena Stepanova [ 2019-03-17 ]

Same circumstances, different crash.

After switching to e.g. 10.3, run instead

CHECK TABLE test.t1 EXTENDED;
ALTER TABLE test.t1 DROP v;

10.3 51e48b9f

#3  <signal handler called>
#4  0x000055c0df5efd0b in prepare_inplace_drop_virtual (ha_alter_info=0x7fbbcc22e790, table=0x7fbb5c020be0) at /data/src/10.3/storage/innobase/handler/handler0alter.cc:4083
#5  0x000055c0df5f9278 in ha_innobase::prepare_inplace_alter_table (this=0x7fbb5c021c88, altered_table=0x7fbb5c038900, ha_alter_info=0x7fbbcc22e790) at /data/src/10.3/storage/innobase/handler/handler0alter.cc:6924
#6  0x000055c0df2a08cd in handler::ha_prepare_inplace_alter_table (this=0x7fbb5c021c88, altered_table=0x7fbb5c038900, ha_alter_info=0x7fbbcc22e790) at /data/src/10.3/sql/handler.cc:4518
#7  0x000055c0df074e88 in mysql_inplace_alter_table (thd=0x7fbb5c000b00, table_list=0x7fbb5c013918, table=0x7fbb5c020be0, altered_table=0x7fbb5c038900, ha_alter_info=0x7fbbcc22e790, inplace_supported=HA_ALTER_INPLACE_INSTANT, target_mdl_request=0x7fbbcc22e980, alter_ctx=0x7fbbcc22f0e0) at /data/src/10.3/sql/sql_table.cc:7510
#8  0x000055c0df07b404 in mysql_alter_table (thd=0x7fbb5c000b00, new_db=0x7fbb5c0051d0, new_name=0x7fbb5c005590, create_info=0x7fbbcc22fcd0, table_list=0x7fbb5c013918, alter_info=0x7fbbcc22fc10, order_num=0, order=0x0, ignore=false) at /data/src/10.3/sql/sql_table.cc:9758
#9  0x000055c0df1035a1 in Sql_cmd_alter_table::execute (this=0x7fbb5c013f88, thd=0x7fbb5c000b00) at /data/src/10.3/sql/sql_alter.cc:497
#10 0x000055c0defa471e in mysql_execute_command (thd=0x7fbb5c000b00) at /data/src/10.3/sql/sql_parse.cc:6335
#11 0x000055c0defa97e0 in mysql_parse (thd=0x7fbb5c000b00, rawbuf=0x7fbb5c013828 "ALTER TABLE test.t1 DROP v", length=26, parser_state=0x7fbbcc231640, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8142
#12 0x000055c0def968cb in dispatch_command (command=COM_QUERY, thd=0x7fbb5c000b00, packet=0x7fbb5c01ba51 "ALTER TABLE test.t1 DROP v", packet_length=26, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1854
#13 0x000055c0def952b5 in do_command (thd=0x7fbb5c000b00) at /data/src/10.3/sql/sql_parse.cc:1396
#14 0x000055c0df0fdb2b in do_handle_one_connection (connect=0x55c0e1f16330) at /data/src/10.3/sql/sql_connect.cc:1403
#15 0x000055c0df0fd8af in handle_one_connection (arg=0x55c0e1f16330) at /data/src/10.3/sql/sql_connect.cc:1309
#16 0x00007fbbd010b494 in start_thread (arg=0x7fbbcc232700) at pthread_create.c:333
#17 0x00007fbbce4f193f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Comment by Elena Stepanova [ 2019-03-17 ]

Raising because it might become a huge problem when people start upgrading, e.g. from 10.1 to 10.3 when/if distributions switch to 10.3+). There is nothing special in the test case, so basically every table with virtual columns might cause continuous crashes.

Comment by Marko Mäkelä [ 2019-03-18 ]

MDEV-14023 tried to work around this bug by forcing affected tables to be rebuilt on ALTER TABLE.

Comment by Marko Mäkelä [ 2019-03-18 ]

MDEV-14046 would remove the work-around that was implemented in MDEV-14023, provided that tests succeed.

This bug demonstrates that there is a problem even with non-indexed virtual columns. So, this bug is effectively blocking MDEV-14046.

I would test the fix of this together with my initial MDEV-14046 fix.

Comment by Marko Mäkelä [ 2019-03-18 ]

Basically, the InnoDB changes related to MDEV-5800 in MariaDB 10.2 are incompatible with the implementation of virtual columns in MariaDB 10.0.

Comment by Marko Mäkelä [ 2019-03-19 ]

The MDEV-17199 fix missed one num_v++ at the start of the loop in calc_row_difference().

Comment by Elena Stepanova [ 2019-03-19 ]

The patch also fixes MDEV-18085, MDEV-18086, MDEV-18087, but not MDEV-18090.

Comment by Elena Stepanova [ 2019-03-19 ]

Re-opening since the ALTER variation from this comment still crashes on 10.3 117291db:

10.3 117291db

#3  <signal handler called>
#4  0x00005567bddd5bc3 in prepare_inplace_drop_virtual (ha_alter_info=0x7f843908d7b0, table=0x7f83e8020bd0) at /data/src/10.3/storage/innobase/handler/handler0alter.cc:4061
#5  0x00005567bdddefd2 in ha_innobase::prepare_inplace_alter_table (this=0x7f83e8021c78, altered_table=0x7f83e8038a20, ha_alter_info=0x7f843908d7b0) at /data/src/10.3/storage/innobase/handler/handler0alter.cc:6900
#6  0x00005567bda86b47 in handler::ha_prepare_inplace_alter_table (this=0x7f83e8021c78, altered_table=0x7f83e8038a20, ha_alter_info=0x7f843908d7b0) at /data/src/10.3/sql/handler.cc:4518
#7  0x00005567bd85b12f in mysql_inplace_alter_table (thd=0x7f83e8000b00, table_list=0x7f83e8013908, table=0x7f83e8020bd0, altered_table=0x7f83e8038a20, ha_alter_info=0x7f843908d7b0, inplace_supported=HA_ALTER_INPLACE_INSTANT, target_mdl_request=0x7f843908d9a0, alter_ctx=0x7f843908e100) at /data/src/10.3/sql/sql_table.cc:7510
#8  0x00005567bd8616ab in mysql_alter_table (thd=0x7f83e8000b00, new_db=0x7f83e80051d0, new_name=0x7f83e8005590, create_info=0x7f843908ecf0, table_list=0x7f83e8013908, alter_info=0x7f843908ec30, order_num=0, order=0x0, ignore=false) at /data/src/10.3/sql/sql_table.cc:9758
#9  0x00005567bd8e9892 in Sql_cmd_alter_table::execute (this=0x7f83e8013f78, thd=0x7f83e8000b00) at /data/src/10.3/sql/sql_alter.cc:494
#10 0x00005567bd78a60b in mysql_execute_command (thd=0x7f83e8000b00) at /data/src/10.3/sql/sql_parse.cc:6284
#11 0x00005567bd78f6bc in mysql_parse (thd=0x7f83e8000b00, rawbuf=0x7f83e8013818 "ALTER TABLE test.t1 DROP v", length=26, parser_state=0x7f8439090640, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8091
#12 0x00005567bd77c970 in dispatch_command (command=COM_QUERY, thd=0x7f83e8000b00, packet=0x7f83e801ba41 "ALTER TABLE test.t1 DROP v", packet_length=26, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1857
#13 0x00005567bd77b35a in do_command (thd=0x7f83e8000b00) at /data/src/10.3/sql/sql_parse.cc:1403
#14 0x00005567bd8e3e51 in do_handle_one_connection (connect=0x5567c153ec00) at /data/src/10.3/sql/sql_connect.cc:1402
#15 0x00005567bd8e3bd5 in handle_one_connection (arg=0x5567c153ec00) at /data/src/10.3/sql/sql_connect.cc:1308
#16 0x00007f8450656494 in start_thread (arg=0x7f8439091700) at pthread_create.c:333
#17 0x00007f844e82493f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Comment by Elena Stepanova [ 2019-03-19 ]

Here is another data set / test case which causes one of failures described here on 10.2 a77e2668

  • wget ftp://perro.askmonty.org/public/innodb_upgrade_data/10.0/format-Antelope/innodb-builtin/16K/normal.tar.gz
  • unpack
  • start the server on the datadir, all defaults will do
  • run

    SELECT COUNT(*) FROM test.tp020;
    

    10.2 a77e2668

    mysqld: /data/src/10.2/storage/innobase/include/dict0dict.ic:484: dict_v_col_t* dict_table_get_nth_v_col(const dict_table_t*, ulint): Assertion `pos < table->n_v_def' failed.
    190319 20:59:41 [ERROR] mysqld got signal 6 ;
     
    #7  0x00007f85627a9ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
    #8  0x000055b67f60199a in dict_table_get_nth_v_col (table=0x7f84f4344078, pos=0) at /data/src/10.2/storage/innobase/include/dict0dict.ic:484
    #9  0x000055b67f604c28 in dict_index_contains_col_or_prefix (index=0x7f84f4346df8, n=0, is_virtual=true) at /data/src/10.2/storage/innobase/dict/dict0dict.cc:914
    #10 0x000055b67f355b9e in ha_innobase::build_template (this=0x7f84f4335ad8, whole_row=false) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:8028
    #11 0x000055b67f3599fb in ha_innobase::change_active_index (this=0x7f84f4335ad8, keynr=2) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:9728
    #12 0x000055b67f358c5e in ha_innobase::index_init (this=0x7f84f4335ad8, keynr=2, sorted=true) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:9284
    #13 0x000055b67ed45c7a in handler::ha_index_init (this=0x7f84f4335ad8, idx=2, sorted=true) at /data/src/10.2/sql/handler.h:2816
    #14 0x000055b67f76049b in ha_partition::index_init (this=0x7f84f4335128, inx=2, sorted=true) at /data/src/10.2/sql/ha_partition.cc:5283
    #15 0x000055b67ed45c7a in handler::ha_index_init (this=0x7f84f4335128, idx=2, sorted=true) at /data/src/10.2/sql/handler.h:2816
    #16 0x000055b67ee33eff in join_read_first (tab=0x7f84f4012ac8) at /data/src/10.2/sql/sql_select.cc:19744
    #17 0x000055b67ee319ba in sub_select (join=0x7f84f4011950, join_tab=0x7f84f4012ac8, end_of_records=false) at /data/src/10.2/sql/sql_select.cc:18755
    #18 0x000055b67ee30fb5 in do_select (join=0x7f84f4011950, procedure=0x0) at /data/src/10.2/sql/sql_select.cc:18302
    #19 0x000055b67ee0b5a7 in JOIN::exec_inner (this=0x7f84f4011950) at /data/src/10.2/sql/sql_select.cc:3623
    #20 0x000055b67ee0aa54 in JOIN::exec (this=0x7f84f4011950) at /data/src/10.2/sql/sql_select.cc:3418
    #21 0x000055b67ee0bc1f in mysql_select (thd=0x7f84f4000b00, tables=0x7f84f4011258, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f84f4011930, unit=0x7f84f40046f8, select_lex=0x7f84f4004e30) at /data/src/10.2/sql/sql_select.cc:3818
    #22 0x000055b67edffe29 in handle_select (thd=0x7f84f4000b00, lex=0x7f84f4004630, result=0x7f84f4011930, setup_tables_done_option=0) at /data/src/10.2/sql/sql_select.cc:376
    #23 0x000055b67edcb2f2 in execute_sqlcom_select (thd=0x7f84f4000b00, all_tables=0x7f84f4011258) at /data/src/10.2/sql/sql_parse.cc:6477
    #24 0x000055b67edc1567 in mysql_execute_command (thd=0x7f84f4000b00) at /data/src/10.2/sql/sql_parse.cc:3535
    #25 0x000055b67edcf1cd in mysql_parse (thd=0x7f84f4000b00, rawbuf=0x7f84f4010f88 "SELECT COUNT(*) FROM test.tp020", length=31, parser_state=0x7f854d0da250, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:8011
    #26 0x000055b67edbccca in dispatch_command (command=COM_QUERY, thd=0x7f84f4000b00, packet=0x7f84f40191b1 "", packet_length=31, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1832
    #27 0x000055b67edbb5e7 in do_command (thd=0x7f84f4000b00) at /data/src/10.2/sql/sql_parse.cc:1386
    #28 0x000055b67ef0ebad in do_handle_one_connection (connect=0x55b681e1fc40) at /data/src/10.2/sql/sql_connect.cc:1335
    #29 0x000055b67ef0e93a in handle_one_connection (arg=0x55b681e1fc40) at /data/src/10.2/sql/sql_connect.cc:1241
    #30 0x00007f8564698494 in start_thread (arg=0x7f854d0db700) at pthread_create.c:333
    #31 0x00007f856286693f in clone () from /lib/x86_64-linux-gnu/libc.so.6
    

The table definition is

CREATE TABLE `tp020` (
  `c06` double(16,8) DEFAULT NULL COMMENT 'Percentage',
  `c09` bigint(20) DEFAULT NULL COMMENT 'X',
  `c12` varchar(64) GENERATED ALWAYS AS (concat(`c09`,' ',`c10`)) VIRTUAL,
  `c02` char(3) NOT NULL DEFAULT '',
  `c05` longblob NOT NULL,
  `c07` date DEFAULT NULL,
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `c10` bigint(20) DEFAULT NULL COMMENT 'Y',
  `c03` varchar(1024) NOT NULL DEFAULT '',
  `c08` text DEFAULT NULL,
  `c01` int(10) unsigned zerofill NOT NULL DEFAULT 0000000000,
  `c04` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
  `c11` varchar(64) GENERATED ALWAYS AS (concat(`c09`,' ',`c10`)) STORED,
  PRIMARY KEY (`id`),
  KEY `idx2` (`c05`(128)),
  KEY `idx1` (`c01`,`c02`)
) ENGINE=InnoDB AUTO_INCREMENT=1001 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16
 PARTITION BY HASH (`id`)
PARTITIONS 2

Comment by Marko Mäkelä [ 2019-03-25 ]

Because part of the MDEV-18040 fix will already be in the 10.2.23 release, but it is unlikely that the remaining part will reach it, let us fix the remaining case in MDEV-18090.

Generated at Thu Feb 08 08:41:23 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.