Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.2(EOL), (13)
10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.3(EOL), 11.4 -
None
Description
The difference with MDEV-22395 is that older versions are also affected, and virtual columns are used.
Setting to minor because it seems to only affect debug builds and involves indexed virtual columns and a non-common character set (although quite possibly there are other charsets that can be used instead).
--source include/have_innodb.inc
|
|
CREATE TABLE t1 (pk INT, i INT, a CHAR(8), va CHAR(8) AS (a) VIRTUAL, PRIMARY KEY(pk), KEY(va(4),i)) ENGINE=InnoDB CHARACTER SET macce; |
INSERT INTO t1 (pk,a) VALUES (1,'foo'),(2,'bar'); |
SELECT i FROM t1; |
|
# Cleanup
|
DROP TABLE t1; |
10.2 3edad542 |
mysqld: /data/src/10.2/storage/innobase/row/row0sel.cc:2914: void row_sel_field_store_in_mysql_format_func(byte*, const mysql_row_templ_t*, const dict_index_t*, ulint, const byte*, ulint): Assertion `templ->mbmaxlen > templ->mbminlen || templ->mysql_col_len == len || (field_no == templ->icp_rec_field_no && field->prefix_len > 0)' failed.
|
210128 18:01:03 [ERROR] mysqld got signal 6 ;
|
|
#7 0x00007fdc509e6f36 in __GI___assert_fail (assertion=0x564e91a2e198 "templ->mbmaxlen > templ->mbminlen || templ->mysql_col_len == len || (field_no == templ->icp_rec_field_no && field->prefix_len > 0)", file=0x564e91a2d250 "/data/src/10.2/storage/innobase/row/row0sel.cc", line=2914, function=0x564e91a2e070 "void row_sel_field_store_in_mysql_format_func(byte*, const mysql_row_templ_t*, const dict_index_t*, ulint, const byte*, ulint)") at assert.c:101
|
#8 0x0000564e91413c39 in row_sel_field_store_in_mysql_format_func (dest=0x7fdbf8035331 "bar ", '\245' <repeats 39 times>, "\210S\003\370\333\177", templ=0x7fdbf8148230, index=0x7fdbf80366e0, field_no=0, data=0x7fdc4b62008c "bar \200", len=4) at /data/src/10.2/storage/innobase/row/row0sel.cc:2914
|
#9 0x0000564e91414860 in row_sel_store_mysql_rec (mysql_rec=0x7fdbf8035320 "\377\002", prebuilt=0x7fdbf8038490, rec=0x7fdc4b61c09d "\200", vrow=0x7fdbf8008110, rec_clust=true, index=0x7fdbf80366e0, offsets=0x7fdc4ae4b7c0) at /data/src/10.2/storage/innobase/row/row0sel.cc:3217
|
#10 0x0000564e91419ed9 in row_search_mvcc (buf=0x7fdbf8035320 "\377\002", mode=PAGE_CUR_G, prebuilt=0x7fdbf8038490, match_mode=0, direction=0) at /data/src/10.2/storage/innobase/row/row0sel.cc:5623
|
#11 0x0000564e912a664f in ha_innobase::index_read (this=0x7fdbf80ab288, buf=0x7fdbf8035320 "\377\002", key_ptr=0x0, key_len=0, find_flag=HA_READ_AFTER_KEY) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:9392
|
#12 0x0000564e912a75f4 in ha_innobase::index_first (this=0x7fdbf80ab288, buf=0x7fdbf8035320 "\377\002") at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:9769
|
#13 0x0000564e9109df61 in handler::ha_index_first (this=0x7fdbf80ab288, buf=0x7fdbf8035320 "\377\002") at /data/src/10.2/sql/handler.cc:2809
|
#14 0x0000564e90e877a1 in join_read_first (tab=0x7fdbf8014128) at /data/src/10.2/sql/sql_select.cc:19847
|
#15 0x0000564e90e8516e in sub_select (join=0x7fdbf8012fe0, join_tab=0x7fdbf8014128, end_of_records=false) at /data/src/10.2/sql/sql_select.cc:18855
|
#16 0x0000564e90e84732 in do_select (join=0x7fdbf8012fe0, procedure=0x0) at /data/src/10.2/sql/sql_select.cc:18402
|
#17 0x0000564e90e5e3a9 in JOIN::exec_inner (this=0x7fdbf8012fe0) at /data/src/10.2/sql/sql_select.cc:3641
|
#18 0x0000564e90e5d850 in JOIN::exec (this=0x7fdbf8012fe0) at /data/src/10.2/sql/sql_select.cc:3436
|
#19 0x0000564e90e5ea12 in mysql_select (thd=0x7fdbf8000d90, tables=0x7fdbf80128d8, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fdbf8012fc0, unit=0x7fdbf8004988, select_lex=0x7fdbf80050c8) at /data/src/10.2/sql/sql_select.cc:3836
|
#20 0x0000564e90e52b8c in handle_select (thd=0x7fdbf8000d90, lex=0x7fdbf80048c8, result=0x7fdbf8012fc0, setup_tables_done_option=0) at /data/src/10.2/sql/sql_select.cc:361
|
#21 0x0000564e90e1d296 in execute_sqlcom_select (thd=0x7fdbf8000d90, all_tables=0x7fdbf80128d8) at /data/src/10.2/sql/sql_parse.cc:6248
|
#22 0x0000564e90e13c45 in mysql_execute_command (thd=0x7fdbf8000d90) at /data/src/10.2/sql/sql_parse.cc:3559
|
#23 0x0000564e90e2103f in mysql_parse (thd=0x7fdbf8000d90, rawbuf=0x7fdbf80126f8 "SELECT i FROM t1", length=16, parser_state=0x7fdc4ae4d5f0, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7763
|
#24 0x0000564e90e0f318 in dispatch_command (command=COM_QUERY, thd=0x7fdbf8000d90, packet=0x7fdbf8008b51 "", packet_length=16, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1827
|
#25 0x0000564e90e0de13 in do_command (thd=0x7fdbf8000d90) at /data/src/10.2/sql/sql_parse.cc:1381
|
#26 0x0000564e90f6872e in do_handle_one_connection (connect=0x564e93093220) at /data/src/10.2/sql/sql_connect.cc:1336
|
#27 0x0000564e90f68493 in handle_one_connection (arg=0x564e93093220) at /data/src/10.2/sql/sql_connect.cc:1241
|
#28 0x0000564e917909fa in pfs_spawn_thread (arg=0x564e930763a0) at /data/src/10.2/storage/perfschema/pfs.cc:1869
|
#29 0x00007fdc50ef6609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#30 0x00007fdc50ad2293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Reproducible on 10.2-10.6.
No obvious immediate problem on a non-debug build.
No obvious problem with MyISAM and otherwise the same test case.
Attachments
Issue Links
- relates to
-
MDEV-18911 Assertion `(templ->is_virtual && !field) || (field && field->prefix_len ? field->prefix_len == len : templ->mysql_col_len == len)' failed row_sel_field_store_in_mysql_format_func
-
- Closed
-
-
MDEV-22395 Assertion `templ->mbmaxlen > templ->mbminlen || templ->mysql_col_len == len || (field_no == templ->icp_rec_field_no && field->prefix_len > 0)' failed in row_sel_field_store_in_mysql_format_func
-
- Closed
-
A slightly different assertion failure:
--source include/have_innodb.inc
# Cleanup
10.2 b87c342d
mysqld: /data/src/10.2/storage/innobase/row/row0sel.cc:2923: void row_sel_field_store_in_mysql_format_func(byte*, const mysql_row_templ_t*, const dict_index_t*, ulint, const byte*, ulint): Assertion `len * templ->mbmaxlen >= templ->mysql_col_len || (field_no == templ->icp_rec_field_no && field->prefix_len > 0) || templ->rec_field_is_prefix' failed.
#7 0x00007f99d2e0bf36 in __GI___assert_fail (assertion=0x558fa6ffb2a0 "len * templ->mbmaxlen >= templ->mysql_col_len || (field_no == templ->icp_rec_field_no && field->prefix_len > 0) || templ->rec_field_is_prefix", file=0x558fa6ffa290 "/data/src/10.2/storage/innobase/row/row0sel.cc", line=2923, function=0x558fa6ffb0b0 "void row_sel_field_store_in_mysql_format_func(byte*, const mysql_row_templ_t*, const dict_index_t*, ulint, const byte*, ulint)") at assert.c:101
#8 0x0000558fa69e0d45 in row_sel_field_store_in_mysql_format_func (dest=0x7f99781761e7 "ixs", ' ' <repeats 197 times>..., templ=0x7f9978148400, index=0x7f99780a9590, field_no=0, data=0x7f99cda44083 "ixs", ' ' <repeats 61 times>, len=64) at /data/src/10.2/storage/innobase/row/row0sel.cc:2923
#9 0x0000558fa69e18b8 in row_sel_store_mysql_rec (mysql_rec=0x7f9978175f98 "\361\005", prebuilt=0x7f9978037b30, rec=0x7f99cda40080 "", vrow=0x7f9978008110, rec_clust=true, index=0x7f99780a9590, offsets=0x7f99cd2708e0) at /data/src/10.2/storage/innobase/row/row0sel.cc:3217
#10 0x0000558fa69e6f31 in row_search_mvcc (buf=0x7f9978175f98 "\361\005", mode=PAGE_CUR_GE, prebuilt=0x7f9978037b30, match_mode=1, direction=0) at /data/src/10.2/storage/innobase/row/row0sel.cc:5623
#11 0x0000558fa68736a7 in ha_innobase::index_read (this=0x7f9978036548, buf=0x7f9978175f98 "\361\005", key_ptr=0x7f997809f2f8 "", key_len=5, find_flag=HA_READ_KEY_EXACT) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:9392
#12 0x0000558fa6674678 in handler::index_read_map (this=0x7f9978036548, buf=0x7f9978175f98 "\361\005", key=0x7f997809f2f8 "", keypart_map=1, find_flag=HA_READ_KEY_EXACT) at /data/src/10.2/sql/handler.h:3132
#13 0x0000558fa666a45f in handler::ha_index_read_map (this=0x7f9978036548, buf=0x7f9978175f98 "\361\005", key=0x7f997809f2f8 "", keypart_map=1, find_flag=HA_READ_KEY_EXACT) at /data/src/10.2/sql/handler.cc:2718
#14 0x0000558fa66714a2 in handler::read_range_first (this=0x7f9978036548, start_key=0x7f9978036630, end_key=0x7f9978036650, eq_range_arg=true, sorted=true) at /data/src/10.2/sql/handler.cc:5483
#15 0x0000558fa6582b31 in handler::multi_range_read_next (this=0x7f9978036548, range_info=0x7f99cd2714c0) at /data/src/10.2/sql/multi_range_read.cc:298
#16 0x0000558fa6582c73 in Mrr_simple_index_reader::get_next (this=0x7f9978036ab8, range_info=0x7f99cd2714c0) at /data/src/10.2/sql/multi_range_read.cc:335
#17 0x0000558fa65858bc in DsMrr_impl::dsmrr_next (this=0x7f9978036978, range_info=0x7f99cd2714c0) at /data/src/10.2/sql/multi_range_read.cc:1411
#18 0x0000558fa6887d52 in ha_innobase::multi_range_read_next (this=0x7f9978036548, range_info=0x7f99cd2714c0) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:21472
#19 0x0000558fa67cb041 in QUICK_RANGE_SELECT::get_next (this=0x7f9978176bd0) at /data/src/10.2/sql/opt_range.cc:11517
#20 0x0000558fa67dcad1 in rr_quick (info=0x7f99cd271700) at /data/src/10.2/sql/records.cc:373
#21 0x0000558fa64d52d3 in mysql_update (thd=0x7f9978000d90, table_list=0x7f99780127e0, fields=..., values=..., conds=0x7f9978013170, order_num=0, order=0x0, limit=18446744073709551615, handle_duplicates=DUP_ERROR, ignore=false, found_return=0x7f99cd271c60, updated_return=0x7f99cd271d10) at /data/src/10.2/sql/sql_update.cc:635
#22 0x0000558fa63e22fa in mysql_execute_command (thd=0x7f9978000d90) at /data/src/10.2/sql/sql_parse.cc:4033
#23 0x0000558fa63ee065 in mysql_parse (thd=0x7f9978000d90, rawbuf=0x7f99780126f8 "UPDATE t1 SET b = 1 WHERE id = 5", length=32, parser_state=0x7f99cd2725f0, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7763
#24 0x0000558fa63dc33e in dispatch_command (command=COM_QUERY, thd=0x7f9978000d90, packet=0x7f9978008b51 "UPDATE t1 SET b = 1 WHERE id = 5", packet_length=32, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1827
#25 0x0000558fa63dae39 in do_command (thd=0x7f9978000d90) at /data/src/10.2/sql/sql_parse.cc:1381
#26 0x0000558fa653575e in do_handle_one_connection (connect=0x558fa9e5e210) at /data/src/10.2/sql/sql_connect.cc:1336
#27 0x0000558fa65354c3 in handle_one_connection (arg=0x558fa9e5e210) at /data/src/10.2/sql/sql_connect.cc:1241
#28 0x0000558fa6d5da52 in pfs_spawn_thread (arg=0x558fa9e41600) at /data/src/10.2/storage/perfschema/pfs.cc:1869
#29 0x00007f99d331b609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#30 0x00007f99d2ef7293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95