Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Duplicate
-
10.3(EOL), 10.4(EOL)
Description
CREATE TABLE t1 (a INT); |
CREATE VIEW v1 AS SELECT * FROM t1; |
CREATE OR REPLACE TABLE t1 (b INT) WITH SYSTEM VERSIONING; |
--error ER_VIEW_INVALID
|
LOAD DATA INFILE 'xx' INTO TABLE v1; |
|
# Cleanup
|
DROP VIEW v1; |
DROP TABLE t1; |
10.3 0076dce2c |
mysqld: /data/src/10.3-bug-post/sql/handler.cc:4696: void handler::ha_drop_table(const char*): Assertion `m_lock_type == 2' failed.
|
191126 2:51:53 [ERROR] mysqld got signal 6 ;
|
|
#7 0x00007f512d698f12 in __GI___assert_fail (assertion=0x555d32724dc3 "m_lock_type == 2", file=0x555d32723ce0 "/data/src/10.3-bug-post/sql/handler.cc", line=4696, function=0x555d327276e0 <handler::ha_drop_table(char const*)::__PRETTY_FUNCTION__> "void handler::ha_drop_table(const char*)") at assert.c:101
|
#8 0x0000555d31c7e3f0 in handler::ha_drop_table (this=0x7f510c1211d8, name=0x7f510c096d10 "./test/t1") at /data/src/10.3-bug-post/sql/handler.cc:4696
|
#9 0x0000555d319d2b30 in free_tmp_table (thd=0x7f510c000af0, entry=0x7f510c120590) at /data/src/10.3-bug-post/sql/sql_select.cc:18863
|
#10 0x0000555d3190d5a9 in mysql_derived_prepare (thd=0x7f510c000af0, lex=0x7f510c0048f8, derived=0x7f510c012958) at /data/src/10.3-bug-post/sql/sql_derived.cc:821
|
#11 0x0000555d3190bf7e in mysql_handle_single_derived (lex=0x7f510c0048f8, derived=0x7f510c012958, phases=2) at /data/src/10.3-bug-post/sql/sql_derived.cc:199
|
#12 0x0000555d31a87d02 in TABLE_LIST::handle_derived (this=0x7f510c012958, lex=0x7f510c0048f8, phases=2) at /data/src/10.3-bug-post/sql/table.cc:8282
|
#13 0x0000555d3192570e in LEX::handle_list_of_derived (this=0x7f510c0048f8, table_list=0x7f510c012958, phases=2) at /data/src/10.3-bug-post/sql/sql_lex.h:4019
|
#14 0x0000555d31948933 in mysql_load (thd=0x7f510c000af0, ex=0x7f510c0128d0, table_list=0x7f510c012958, fields_vars=..., set_fields=..., set_values=..., handle_duplicates=DUP_ERROR, ignore=false, read_file_from_client=false) at /data/src/10.3-bug-post/sql/sql_load.cc:411
|
#15 0x0000555d3195e7c2 in mysql_execute_command (thd=0x7f510c000af0) at /data/src/10.3-bug-post/sql/sql_parse.cc:4873
|
#16 0x0000555d31968577 in mysql_parse (thd=0x7f510c000af0, rawbuf=0x7f510c012808 "LOAD DATA INFILE 'xx' INTO TABLE v1", length=35, parser_state=0x7f51280985e0, is_com_multi=false, is_next_command=false) at /data/src/10.3-bug-post/sql/sql_parse.cc:7818
|
#17 0x0000555d319550c3 in dispatch_command (command=COM_QUERY, thd=0x7f510c000af0, packet=0x7f510c008c61 "LOAD DATA INFILE 'xx' INTO TABLE v1", packet_length=35, is_com_multi=false, is_next_command=false) at /data/src/10.3-bug-post/sql/sql_parse.cc:1856
|
#18 0x0000555d31953a0b in do_command (thd=0x7f510c000af0) at /data/src/10.3-bug-post/sql/sql_parse.cc:1401
|
#19 0x0000555d31acae4c in do_handle_one_connection (connect=0x555d351c51b0) at /data/src/10.3-bug-post/sql/sql_connect.cc:1403
|
#20 0x0000555d31acabae in handle_one_connection (arg=0x555d351c51b0) at /data/src/10.3-bug-post/sql/sql_connect.cc:1308
|
#21 0x0000555d324774ee in pfs_spawn_thread (arg=0x555d351e0170) at /data/src/10.3-bug-post/storage/perfschema/pfs.cc:1862
|
#22 0x00007f512f20e4a4 in start_thread (arg=0x7f5128099700) at pthread_create.c:456
|
#23 0x00007f512d755d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
|
Reproducible on 10.3-10.5.
The problem appeared in 10.3 with this commit:
commit 0076dce2c89248b6c0252ec4385879194f9aadbf
|
Author: Aleksey Midenkov
|
Date: Fri Nov 22 14:29:03 2019 +0300
|
|
MDEV-18727 improve DML operation of System Versioning
|
MDEV-18957 UPDATE with LIMIT clause is wrong for versioned partitioned tables
|
|
UPDATE, DELETE: replace linear search of current/historical records
|
with vers_setup_conds().
|
|
Additional DML cases in view.test
|
Attachments
Issue Links
- duplicates
-
MDEV-21155 Assertion with versioned table upon DELETE from view of view after replacing first view
-
- Closed
-
- relates to
-
MDEV-15534 InnoDB: Failing assertion: prebuilt->magic_n == ROW_PREBUILT_ALLOCATED, SIGSEGV in mark_used_tables_as_free_for_reuse, Assertion `m_lock_type == 2'
-
- Open
-
-
MDEV-21155 Assertion with versioned table upon DELETE from view of view after replacing first view
-
- Closed
-
Variations on a non-debug build.
With MyISAM:
--error ER_VIEW_INVALID
# Cleanup
Similar to
MDEV-21155, but without prepared statements:10.3 RelWithDebInfo bf58ec77
#3 <signal handler called>
#4 mi_extra (info=0x0, function=HA_EXTRA_DETACH_CHILDREN, extra_arg=0x0) at /data/src/10.3/storage/myisam/mi_extra.c:42
#5 0x000055738891e9e0 in close_thread_tables (thd=thd@entry=0x7fc4180009a8) at /data/src/10.3/sql/sql_base.cc:756
#6 0x0000557388975a8c in mysql_execute_command (thd=thd@entry=0x7fc4180009a8) at /data/src/10.3/sql/sql_parse.cc:6115
#7 0x000055738897d679 in mysql_parse (thd=thd@entry=0x7fc4180009a8, rawbuf=<optimized out>, length=35, parser_state=parser_state@entry=0x7fc42a2be620, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:7818
#8 0x000055738897fe8d in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7fc4180009a8, packet=packet@entry=0x7fc4180070b9 "LOAD DATA INFILE 'xx' INTO TABLE v1", packet_length=packet_length@entry=35, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.3/sql/sql_parse.cc:1856
#9 0x0000557388980b06 in do_command (thd=0x7fc4180009a8) at /data/src/10.3/sql/sql_parse.cc:1401
#10 0x0000557388a47b44 in do_handle_one_connection (connect=connect@entry=0x55738b301d18) at /data/src/10.3/sql/sql_connect.cc:1403
#11 0x0000557388a47bf4 in handle_one_connection (arg=arg@entry=0x55738b301d18) at /data/src/10.3/sql/sql_connect.cc:1308
#12 0x0000557388fb6fd4 in pfs_spawn_thread (arg=0x55738b29ce78) at /data/src/10.3/storage/perfschema/pfs.cc:1862
#13 0x00007fc431c374a4 in start_thread (arg=0x7fc42a2bf700) at pthread_create.c:456
#14 0x00007fc43017ed0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
With InnoDB:
--source include/have_innodb.inc
--error ER_VIEW_INVALID
# Cleanup
10.3 RelWithDebInfo bf58ec77
2019-11-27 20:28:47 0x7effc0b81700 InnoDB: Assertion failure in file /data/src/10.3/storage/innobase/row/row0mysql.cc line 1060
InnoDB: Failing assertion: prebuilt->magic_n == ROW_PREBUILT_ALLOCATED
#5 0x00007effc77bd42a in __GI_abort () at abort.c:89
#6 0x000055718ae7fe47 in ut_dbg_assertion_failed (expr=expr@entry=0x55718b75e588 "prebuilt->magic_n == ROW_PREBUILT_ALLOCATED", file=file@entry=0x55718b75e048 "/data/src/10.3/storage/innobase/row/row0mysql.cc", line=line@entry=1060) at /data/src/10.3/storage/innobase/ut/ut0dbg.cc:60
#7 0x000055718b32e518 in row_update_prebuilt_trx (prebuilt=<optimized out>, trx=trx@entry=0x7effc1649090) at /data/src/10.3/storage/innobase/row/row0mysql.cc:1060
#8 0x000055718b282b58 in ha_innobase::update_thd (this=0x7eff7406ad60, this=0x7eff7406ad60, thd=0x7eff740009a8) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:2963
#9 ha_innobase::external_lock (this=0x7eff7406ad60, thd=0x7eff740009a8, lock_type=2) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:15732
#10 0x000055718b11b7cc in handler::ha_external_lock (this=0x7eff7406ad60, thd=thd@entry=0x7eff740009a8, lock_type=lock_type@entry=2) at /data/src/10.3/sql/handler.cc:6371
#11 0x000055718b1deea7 in unlock_external (thd=thd@entry=0x7eff740009a8, table=0x7eff74012220, count=<optimized out>) at /data/src/10.3/sql/lock.cc:708
#12 0x000055718b1df043 in mysql_unlock_tables (thd=0x7eff740009a8, sql_lock=0x7eff74012200, free_lock=<optimized out>) at /data/src/10.3/sql/lock.cc:429
#13 0x000055718b1df621 in mysql_unlock_tables (thd=<optimized out>, sql_lock=<optimized out>) at /data/src/10.3/sql/lock.cc:415
#14 0x000055718aef1a91 in close_thread_tables (thd=thd@entry=0x7eff740009a8) at /data/src/10.3/sql/sql_base.cc:854
#15 0x000055718af48a8c in mysql_execute_command (thd=thd@entry=0x7eff740009a8) at /data/src/10.3/sql/sql_parse.cc:6115
#16 0x000055718af50679 in mysql_parse (thd=thd@entry=0x7eff740009a8, rawbuf=<optimized out>, length=35, parser_state=parser_state@entry=0x7effc0b80620, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:7818
#17 0x000055718af52e8d in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7eff740009a8, packet=packet@entry=0x7eff740070b9 "LOAD DATA INFILE 'xx' INTO TABLE v1", packet_length=packet_length@entry=35, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.3/sql/sql_parse.cc:1856
#18 0x000055718af53b06 in do_command (thd=0x7eff740009a8) at /data/src/10.3/sql/sql_parse.cc:1401
#19 0x000055718b01ab44 in do_handle_one_connection (connect=connect@entry=0x55718d7455e8) at /data/src/10.3/sql/sql_connect.cc:1403
#20 0x000055718b01abf4 in handle_one_connection (arg=arg@entry=0x55718d7455e8) at /data/src/10.3/sql/sql_connect.cc:1308
#21 0x000055718b589fd4 in pfs_spawn_thread (arg=0x55718d745848) at /data/src/10.3/storage/perfschema/pfs.cc:1862
#22 0x00007effc932a4a4 in start_thread (arg=0x7effc0b81700) at pthread_create.c:456
#23 0x00007effc7871d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
With Aria:
--error ER_VIEW_INVALID
# Cleanup
#3 <signal handler called>
#4 ha_maria::extra (this=0x7ff9840aa170, operation=HA_EXTRA_DETACH_CHILDREN) at /data/src/10.3/storage/maria/ha_maria.cc:2510
#5 0x000055d6e8f5d9e0 in close_thread_tables (thd=thd@entry=0x7ff9840009a8) at /data/src/10.3/sql/sql_base.cc:756
#6 0x000055d6e8fb4a8c in mysql_execute_command (thd=thd@entry=0x7ff9840009a8) at /data/src/10.3/sql/sql_parse.cc:6115
#7 0x000055d6e8fbc679 in mysql_parse (thd=thd@entry=0x7ff9840009a8, rawbuf=<optimized out>, length=35, parser_state=parser_state@entry=0x7ff994512620, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:7818
#8 0x000055d6e8fbee8d in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7ff9840009a8, packet=packet@entry=0x7ff9840070b9 "LOAD DATA INFILE 'xx' INTO TABLE v1", packet_length=packet_length@entry=35, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.3/sql/sql_parse.cc:1856
#9 0x000055d6e8fbfb06 in do_command (thd=0x7ff9840009a8) at /data/src/10.3/sql/sql_parse.cc:1401
#10 0x000055d6e9086b44 in do_handle_one_connection (connect=connect@entry=0x55d6ebfefd08) at /data/src/10.3/sql/sql_connect.cc:1403
#11 0x000055d6e9086bf4 in handle_one_connection (arg=arg@entry=0x55d6ebfefd08) at /data/src/10.3/sql/sql_connect.cc:1308
#12 0x000055d6e95f5fd4 in pfs_spawn_thread (arg=0x55d6ebf8ae68) at /data/src/10.3/storage/perfschema/pfs.cc:1862
#13 0x00007ff99be8b4a4 in start_thread (arg=0x7ff994513700) at pthread_create.c:456
#14 0x00007ff99a3d2d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97