ALTER TABLE w/o ENGINE= clause or OPTIMIZE TABLE changes table engine if enforce-storage-engine active | handle_fatal_signal (sig=6) in heap_rfirst | heap/hp_rfirst.c:69
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.1 |
Invalid
|
Undecided
|
Unassigned | |||
5.5 |
Fix Released
|
High
|
Yura Sorokin | |||
5.6 |
Fix Released
|
High
|
Yura Sorokin | |||
5.7 |
Fix Released
|
High
|
Yura Sorokin |
Bug Description
# mysqld options required for replay: --sql_mode=
DROP DATABASE test;CREATE DATABASE test;USE test;
CREATE FUNCTION func_rewrite_1(i INT)RETURNS INT DETERMINISTIC RETURN i+1;
alter table mysql.proc modify definer char(77)collate utf8_bin default'';
SHOW FUNCTION STATUS LIKE 'fn1';
The attached tarball (1440248482.tar.gz) gives the testcase as an exact match of our system, including some handy utilities
$ vi 1440248482_mybase # STEP1: Update the base path in this file (usually the only change required!). If you use a non-binary distribution, please update SOURCE_DIR location also
$ ./1440248482_init # STEP2: Initializes the data dir
$ ./1440248482_start # STEP3: Starts mysqld
$ ./1440248482_cl # STEP4: To check mysqld is up
$ ./1440248482_
$ ./1440248482_run # OPTIONAL: Run the testcase with the mysql CLI (may not reproduce the issue, as the pquery binary was used for the original testcase reduction)
$ vi /dev/shm/
$ ./1440248482_gdb # OPTIONAL: Brings you to a gdb prompt with gdb attached to the used mysqld and attached to the generated core
$ ./1440248482_
** GDB info
#0 0x00007ff78fee6771 in __pthread_kill (threadid=
#1 0x0000000000abfcc4 in my_write_core (sig=6) at /mnt/workspace/
sys/stacktrace.
#2 0x00000000007330dd in handle_fatal_signal (sig=6) at /mnt/workspace/
3.1/sql/
#3 <signal handler called>
#4 0x00007ff78eaea5d7 in __GI_raise (sig=sig@entry=6) at ../nptl/
#5 0x00007ff78eaebcc8 in __GI_abort () at abort.c:90
#6 0x00007ff78eae3546 in __assert_fail_base (fmt=0x7ff78ec33128 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=
file@entry=
=line@entry=69, function=
#7 0x00007ff78eae35f2 in __GI___assert_fail (assertion=
#8 0x0000000000d92178 in heap_rfirst (info=0x7ff76f4
#9 0x0000000000d8cb99 in ha_heap:
#10 0x00000000006461b4 in handler:
#11 0x000000000083d64c in fill_schema_proc (thd=0x7ff7776e
#12 0x00000000008454f9 in do_fill_table (thd=0x7ff7776e
#13 0x00000000008458c8 in get_schema_
#14 0x00000000008179dc in JOIN::prepare_
#15 0x00000000007b3faf in JOIN::exec (this=0x7ff76f4
#16 0x00000000008184d5 in mysql_execute_
#17 0x00000000008187d1 in mysql_select (thd=0x7ff7776e
#18 0x0000000000816868 in handle_select (thd=0x7ff7776e
#19 0x00000000007ee7cd in execute_
#20 0x00000000007e6c4d in mysql_execute_
#21 0x00000000007f14ea in mysql_parse (thd=0x7ff7776e
#22 0x00000000007e329e in dispatch_command (command=COM_QUERY, thd=0x7ff7776e5000, packet=
#23 0x00000000007e210c in do_command (thd=0x7ff7776e
#24 0x00000000007a9f60 in do_handle_
#25 0x00000000007a99e0 in handle_
#26 0x0000000000dd14df in pfs_spawn_thread (arg=0x7ff78cff
#27 0x00007ff78fee1df5 in start_thread (arg=0x7ff7904e
#28 0x00007ff78ebab1ad in clone () at ../sysdeps/
summary: |
- handle_fatal_signal (sig=6) in heap_rfirst | heap/hp_rfirst.c:69 + ALTER TABLE w/o ENGINE= clause changes table engine if enforce-storage- + engine active | handle_fatal_signal (sig=6) in heap_rfirst | + heap/hp_rfirst.c:69 |
no longer affects: | percona-server/5.7 |
summary: |
- ALTER TABLE w/o ENGINE= clause changes table engine if enforce-storage- - engine active | handle_fatal_signal (sig=6) in heap_rfirst | - heap/hp_rfirst.c:69 + ALTER TABLE w/o ENGINE= clause or OPTIMIZE TABLE changes table engine if + enforce-storage-engine active | handle_fatal_signal (sig=6) in + heap_rfirst | heap/hp_rfirst.c:69 |
tags: | added: qa57 |
The problem is that ALTER TABLE changes the table storage engine even if not asked to when enforce-se is active. The fix would be to ignore enforced SE for existing table ALTER TABLEs. This is similar to https:/ /mariadb. atlassian. net/browse/ MDEV-8577.