[MDEV-23543] S3 storage engine: assertion failure on ALTER TABLE Created: 2020-08-23  Updated: 2020-09-22

Status: Confirmed
Project: MariaDB Server
Component/s: Storage Engine - S3
Affects Version/s: 10.5
Fix Version/s: 10.5

Type: Bug Priority: Major
Reporter: Sergei Petrunia Assignee: Michael Widenius
Resolution: Unresolved Votes: 0
Labels: None


 Description   

I am not sure if this is supposed to work, but I think it is not supposed to crash the server with failed assertion:

create table ten(a int primary key);
insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
alter table ten engine=s3;
alter table ten  add b int;

  mysqld: /home/psergey/dev-git/10.5-cl2/sql/protocol.cc:616: void Protocol::end_statement(): Assertion `0' failed.
  
  Thread 15 "mysqld" received signal SIGABRT, Aborted.
  [Switching to Thread 0x7fffd4cfc700 (LWP 20494)]
  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
  51	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) wher
  #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
  #1  0x00007ffff54978b1 in __GI_abort () at abort.c:79
  #2  0x00007ffff548742a in __assert_fail_base (fmt=0x7ffff560ea38 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x555556bbbca0 "0", file=file@entry=0x555556bbb948 "/home/psergey/dev-git/10.5-cl2/sql/protocol.cc", line=line@entry=616, function=function@entry=0x555556bbc3f0 <Protocol::end_statement()::__PRETTY_FUNCTION__> "void Protocol::end_statement()") at assert.c:92
  #3  0x00007ffff54874a2 in __GI___assert_fail (assertion=0x555556bbbca0 "0", file=0x555556bbb948 "/home/psergey/dev-git/10.5-cl2/sql/protocol.cc", line=616, function=0x555556bbc3f0 <Protocol::end_statement()::__PRETTY_FUNCTION__> "void Protocol::end_statement()") at assert.c:101
  #4  0x0000555555d21ccc in Protocol::end_statement (this=0x7ffea0001340) at /home/psergey/dev-git/10.5-cl2/sql/protocol.cc:616
  #5  0x0000555555e51374 in dispatch_command (command=COM_QUERY, thd=0x7ffea0000d78, packet=0x7ffea0009069 "alter table ten  add b int", packet_length=26, is_com_multi=false, is_next_command=false) at /home/psergey/dev-git/10.5-cl2/sql/sql_parse.cc:2460
  #6  0x0000555555e4da84 in do_command (thd=0x7ffea0000d78) at /home/psergey/dev-git/10.5-cl2/sql/sql_parse.cc:1348
  #7  0x0000555555ff4643 in do_handle_one_connection (connect=0x5555648bade8, put_in_cache=true) at /home/psergey/dev-git/10.5-cl2/sql/sql_connect.cc:1410
  #8  0x0000555555ff43ac in handle_one_connection (arg=0x5555648bade8) at /home/psergey/dev-git/10.5-cl2/sql/sql_connect.cc:1312
  #9  0x0000555556536b27 in pfs_spawn_thread (arg=0x5555646b4278) at /home/psergey/dev-git/10.5-cl2/storage/perfschema/pfs.cc:2201



 Comments   
Comment by Elena Stepanova [ 2020-09-22 ]

Other variations of ALTER fail too.

Reproducible both with MinIO and Amazon, but only when the SQL is executed from the client (that is, I couldn't reproduce it via MTR even after applying the usual tricks).

No obvious effect on a non-debug build.

Generated at Thu Feb 08 09:23:12 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.