Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.6.20
Description
origin/10.6 066f920484bb186774d65e243ca2763a4293d866 2024-10-28T13:29:21+02:00
Scenario:
1. Start the server
|
2. One session (RQG Thread1) creates a table
|
CREATE TABLE t2 (
|
col1 INT PRIMARY KEY, col2 INT, col_int INTEGER , col_string INTEGER,
|
col_varchar VARCHAR(500), col_text TEXT )
|
ENGINE = InnoDB ROW_FORMAT = compressed.
|
The second session (RQG Thread2) runs
|
SET AUTOCOMMIT = 0; SET @fill_amount = (@@innodb_page_size / 2 ) + 1 ;
|
3. RQG Thread1 runs in a loop
|
DELETE FROM t2 WHERE col2 = { $my_int= $prng->int(513, 4096) } OR col2 IS NULL ;
|
COMMIT ;
|
RQG Thread2 runs in a loop a statement picked random from
|
a) ALTER TABLE t2 ADD UNIQUE KEY ( col_text(9) ) , ADD UNIQUE KEY ( col_text(9) ) |
|
b) INSERT INTO t2 (col1,col2,col_int, col_string, col_text)
|
VALUES ( { $my_int= $prng->int(513, 4096) } , $my_int, $my_int,
|
REPEAT(SUBSTR(CAST( $my_int AS CHAR),1,1), 10),
|
REPEAT(SUBSTR(CAST( $my_int AS CHAR),1,1), @fill_amount) ); COMMIT ;
|
$prng->int(513, 4096) dices an integer between 513 and 4096.
|
|
Runs of this test end
|
- very high likelihood if RelWithDebInfo or high optimized without debug info
|
- low likelihood if build with debug and optimization -Og
|
with
|
# 2024-11-13 10:03:37 14 [ERROR] InnoDB: Cannot load compressed BLOB [page id: space=6, page number=143]
|
# 2024-11-13 10:03:37 0x5c50418cf6c0 InnoDB: Assertion failure in file /data/Server/10.6/storage/innobase/row/row0merge.cc line 728
|
# 2024-11-13T10:03:49 [2453905] | InnoDB: Failing assertion: buf != field_ref_zero
|
...
|
# 2024-11-13T10:06:31 [2453905] | Thread 3 (Thread 2455585.2456461 (mariadbd)):
|
# 2024-11-13T10:06:31 [2453905] | #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
|
# 2024-11-13T10:06:31 [2453905] | #1 __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
|
# 2024-11-13T10:06:31 [2453905] | #2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
|
# 2024-11-13T10:06:31 [2453905] | #3 0x0000679b706a426e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
|
# 2024-11-13T10:06:31 [2453905] | #4 0x0000679b706878ff in __GI_abort () at ./stdlib/abort.c:79
|
# 2024-11-13T10:06:31 [2453905] | #5 0x0000576e4fb5b1f4 in ut_dbg_assertion_failed (expr=expr@entry=0x576e5002fbcb "buf != field_ref_zero", file=file@entry=0x576e4ff7a9f0 "/data/Server/10.6/storage/innobase/row/row0merge.cc", line=line@entry=728) at /data/Server/10.6/storage/innobase/ut/ut0dbg.cc:60
|
# 2024-11-13T10:06:31 [2453905] | #6 0x0000576e4facacfc in row_merge_buf_add (buf=buf@entry=0x576e4802bee0, fts_index=fts_index@entry=0x0, old_table=old_table@entry=0xe404b1d0, new_table=<optimized out>, psort_info=psort_info@entry=0x0, row=<optimized out>, ext=<optimized out>, doc_id=<optimized out>, conv_heap=<optimized out>, err=<optimized out>, v_heap=<optimized out>, my_table=<optimized out>, trx=<optimized out>, col_collate=<optimized out>) at /data/Server/10.6/storage/innobase/row/row0merge.cc:728
|
# 2024-11-13T10:06:31 [2453905] | #7 0x0000576e4facdc6a in row_merge_read_clustered_index (trx=trx@entry=0x749a0384c780, table=table@entry=0x5c50418cb230, old_table=old_table@entry=0xe404b1d0, new_table=<optimized out>, new_table@entry=0xe404b1d0, online=online@entry=true, index=index@entry=0x576e4805ae28, fts_sort_idx=<optimized out>, psort_info=<optimized out>, files=<optimized out>, key_numbers=<optimized out>, n_index=<optimized out>, defaults=<optimized out>, add_v=<optimized out>, col_map=<optimized out>, add_autoinc=<optimized out>, sequence=..., block=<optimized out>, skip_pk_sort=<optimized out>, tmpfd=<optimized out>, stage=<optimized out>, pct_cost=pct_cost@entry=33.333333333333336, crypt_block=<optimized out>, eval_table=<optimized out>, allow_not_null=<optimized out>, col_collate=<optimized out>) at /data/Server/10.6/storage/innobase/row/row0merge.cc:2350
|
# 2024-11-13T10:06:31 [2453905] | #8 0x0000576e4facf3e6 in row_merge_build_indexes (trx=0x749a0384c780, old_table=0xe404b1d0, new_table=new_table@entry=0xe404b1d0, online=true, indexes=0x576e4805ae28, key_numbers=0x576e4805ae38, n_indexes=2, table=0x5c50418cb230, defaults=0x0, col_map=0x0, add_autoinc=18446744073709551615, sequence=..., skip_pk_sort=false, stage=0xe4038c90, add_v=0x0, eval_table=0x5c50418cb230, allow_not_null=false, col_collate=0x0) at /data/Server/10.6/storage/innobase/row/row0merge.cc:4519
|
# 2024-11-13T10:06:31 [2453905] | #9 0x0000576e4f9cdc7b in ha_innobase::inplace_alter_table (this=0xe403b090, altered_table=0x5c50418cb230, ha_alter_info=0x5c50418cb170) at /data/Server/10.6/storage/innobase/handler/handler0alter.cc:8903
|
# 2024-11-13T10:06:31 [2453905] | #10 0x0000576e4f5a0446 in handler::ha_inplace_alter_table (ha_alter_info=0x5c50418cb170, altered_table=0x5c50418cb230, this=<optimized out>) at /data/Server/10.6/sql/handler.h:4699
|
# 2024-11-13T10:06:31 [2453905] | #11 mysql_inplace_alter_table (thd=thd@entry=0x576e48000f98, table_list=0x576e48023438, table=table@entry=0xe40008f8, altered_table=altered_table@entry=0x5c50418cb230, ha_alter_info=ha_alter_info@entry=0x5c50418cb170, target_mdl_request=target_mdl_request@entry=0x5c50418cbaf0, ddl_log_state=0x5c50418cb130, trigger_param=0x5c50418cb660, alter_ctx=0x5c50418cc6b0) at /data/Server/10.6/sql/sql_table.cc:7586
|
# 2024-11-13T10:06:31 [2453905] | #12 0x0000576e4f5b083a in mysql_alter_table (thd=thd@entry=0x576e48000f98, new_db=new_db@entry=0x576e48005a48, new_name=<optimized out>, create_info=create_info@entry=0x5c50418cd550, table_list=<optimized out>, table_list@entry=0x576e48023438, recreate_info=recreate_info@entry=0x5c50418cd3a0, alter_info=<optimized out>, order_num=<optimized out>, order=<optimized out>, ignore=<optimized out>, if_exists=<optimized out>) at /data/Server/10.6/sql/sql_table.cc:10681
|
# 2024-11-13T10:06:31 [2453905] | #13 0x0000576e4f61dcb2 in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x576e48000f98) at /data/Server/10.6/sql/sql_alter.cc:675
|
# 2024-11-13T10:06:31 [2453905] | #14 0x0000576e4f5058fe in mysql_execute_command (thd=thd@entry=0x576e48000f98, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /data/Server/10.6/sql/sql_parse.cc:6153
|
# 2024-11-13T10:06:31 [2453905] | #15 0x0000576e4f5063fa in mysql_parse (thd=thd@entry=0x576e48000f98, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x5c50418ce410) at /data/Server/10.6/sql/sql_parse.cc:8193
|
# 2024-11-13T10:06:31 [2453905] | #16 0x0000576e4f507ccb in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x576e48000f98, packet=packet@entry=0x576e4801b229 "ALTER TABLE t2 ADD UNIQUE KEY ( col_text(9) ), ADD UNIQUE KEY ( col_text(9) ) /* E_R Thread2 QNO 1867 CON_ID 14 */ ", packet_length=packet_length@entry=115, blocking=blocking@entry=true) at /data/Server/10.6/sql/sql_parse.cc:1909
|
|
I am aware that the statement
|
ALTER TABLE t2 ADD UNIQUE KEY ( col_text(9) ), ADD UNIQUE KEY ( col_text(9) );
|
is nonsense. IMHO the server should deny the execution of the statement.
|
But I am more irritated by the fact that changing the ROW_FORMAT to other formats like Dynamic, Compact, Redundant lets the problem disappear.
|
|
Attachments
Issue Links
- relates to
-
MDEV-13542 Crashing on a corrupted page is unhelpful
- Closed
-
MDEV-32174 ROW_FORMAT=COMPRESSED table corruption due to ROLLBACK
- In Testing