Details
-
Bug
-
Status: In Testing (View Workflow)
-
Critical
-
Resolution: Unresolved
-
N/A
-
None
Description
--source include/have_innodb.inc
|
|
CREATE TABLE t (id INT, a TIME, b BIT, KEY(a,id)) ENGINE=InnoDB; |
INSERT INTO t VALUES (1,'00:00:00',0); |
SET FOREIGN_KEY_CHECKS = OFF; |
ALTER TABLE t ADD FOREIGN KEY (b) REFERENCES t (a); |
SET FOREIGN_KEY_CHECKS = ON; |
CHECK TABLE t EXTENDED; |
|
DROP TABLE t; |
bb-11.8-check-table 01b0c6c996db756fc40d51178d669fcfbec7a1d7 |
#3 <signal handler called>
|
#4 0x000055e3c23d4064 in Field::ptr_in_record (this=0x0, record=0x7fef0c224a48 "\361\001") at /data/bld/preview-11.8-bb-11.8-check-table-debug/sql/field.h:1215
|
#5 0x000055e3c27c50c1 in key_copy (to_key=0x7fef0c01972b "\245", '\217' <repeats 199 times>..., from_record=0x7fef0c224a48 "\361\001", from_key_info=0x7fef0c108298, to_key_info=0x7fef0c121cb0, key_length=1, with_zerofill=false) at /data/bld/preview-11.8-bb-11.8-check-table-debug/sql/key.cc:149
|
#6 0x000055e3c2671d44 in handler::check_record_reference (this=0x7fef0c21dc80, this_key=0x7fef0c108298, ref_key=0x7fef0c121cb0, fk_parts=1, key_buf=0x7fef0c019728 "", prefix_length=4, this_record=0x7fef0c224a48 "\361\001", ref_record=0x7fef0c228ef8 "\377") at /data/bld/preview-11.8-bb-11.8-check-table-debug/sql/handler.cc:7962
|
#7 0x000055e3c244278d in check_key_referential_integrity (table=0x7fef0c21a6e8, ref_table=0x7fef0c1087f8, this_key=0x7fef0c108298, ref_key=0x7fef0c121cb0, fk_parts=1, key_buf=0x7fef0c019728 "", fk_name=...) at /data/bld/preview-11.8-bb-11.8-check-table-debug/sql/sql_admin.cc:1746
|
#8 0x000055e3c2442ca0 in check_foreign_key_relation (thd=0x7fef0c000dc8, this_table=0x7fef0c21a6e8, ref_table=0x7fef0c1087f8, fk=..., key_buf=0x7fef0c019728 "") at /data/bld/preview-11.8-bb-11.8-check-table-debug/sql/sql_admin.cc:1853
|
#9 0x000055e3c24430a3 in check_foreign_key_relations (thd=0x7fef0c000dc8, table=0x7fef0c21a6e8) at /data/bld/preview-11.8-bb-11.8-check-table-debug/sql/sql_admin.cc:1913
|
#10 0x000055e3c26696b3 in handler::ha_check (this=0x7fef0c1069b0, thd=0x7fef0c000dc8, check_opt=0x7fef0c006638) at /data/bld/preview-11.8-bb-11.8-check-table-debug/sql/handler.cc:5398
|
#11 0x000055e3c243f59f in mysql_admin_table (thd=0x7fef0c000dc8, tables=0x7fef0c017ef8, check_opt=0x7fef0c006638, operator_name=0x55e3c3c2f2e0 <msg_check>, lock_type=TL_READ_NO_INSERT, org_open_for_modify=false, no_errors_from_open=false, extra_open_options=32, prepare_func=0x0, operator_func=(int (handler::*)(handler * const, THD *, HA_CHECK_OPT *)) 0x55e3c26694c8 <handler::ha_check(THD*, st_ha_check_opt*)>, view_operator_func=0x55e3c23ad3f1 <view_check(THD*, TABLE_LIST*, st_ha_check_opt*)>, is_cmd_replicated=false) at /data/bld/preview-11.8-bb-11.8-check-table-debug/sql/sql_admin.cc:942
|
#12 0x000055e3c244204c in Sql_cmd_check_table::execute (this=0x7fef0c018620, thd=0x7fef0c000dc8) at /data/bld/preview-11.8-bb-11.8-check-table-debug/sql/sql_admin.cc:1652
|
#13 0x000055e3c2228094 in mysql_execute_command (thd=0x7fef0c000dc8, is_called_from_prepared_stmt=false) at /data/bld/preview-11.8-bb-11.8-check-table-debug/sql/sql_parse.cc:5872
|
#14 0x000055e3c222e30a in mysql_parse (thd=0x7fef0c000dc8, rawbuf=0x7fef0c017e30 "CHECK TABLE t EXTENDED", length=22, parser_state=0x7fef346582e0) at /data/bld/preview-11.8-bb-11.8-check-table-debug/sql/sql_parse.cc:7901
|
#15 0x000055e3c221a639 in dispatch_command (command=COM_QUERY, thd=0x7fef0c000dc8, packet=0x7fef0c00be89 "", packet_length=22, blocking=true) at /data/bld/preview-11.8-bb-11.8-check-table-debug/sql/sql_parse.cc:1903
|
#16 0x000055e3c2218f92 in do_command (thd=0x7fef0c000dc8, blocking=true) at /data/bld/preview-11.8-bb-11.8-check-table-debug/sql/sql_parse.cc:1416
|
#17 0x000055e3c2424b53 in do_handle_one_connection (connect=0x55e3c60b8d28, put_in_cache=true) at /data/bld/preview-11.8-bb-11.8-check-table-debug/sql/sql_connect.cc:1415
|
#18 0x000055e3c24248d4 in handle_one_connection (arg=0x55e3c6097e08) at /data/bld/preview-11.8-bb-11.8-check-table-debug/sql/sql_connect.cc:1327
|
#19 0x000055e3c29a6b5e in pfs_spawn_thread (arg=0x55e3c607eb08) at /data/bld/preview-11.8-bb-11.8-check-table-debug/storage/perfschema/pfs.cc:2198
|
#20 0x00007fef42ea8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
|
#21 0x00007fef42f2861c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
|
Attachments
Issue Links
- is caused by
-
MDEV-34309 CHECK TABLE should check that foreign key relations are correct
-
- In Testing
-
The confusing thing here is that the following relations are impossible:
INT -> BIGINT
SMALLINT -> INT
INT -> TIME
BIT -> INT
Only the BIT -> TIME relation was found possible among those with different stored lengths.
sanja, please review the corresponding commit on branch bb-11.8-check-table.