[MDEV-6836] Assertion `0' failed on creating a unique index on a Mroonga table with non-unique values Created: 2014-10-05  Updated: 2015-09-04  Resolved: 2015-09-04

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Mroonga
Affects Version/s: 10.0.14
Fix Version/s: 10.0.15

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Kentoku Shiba (Inactive)
Resolution: Fixed Votes: 0
Labels: mroonga


 Description   

Also filed as https://github.com/mroonga/mroonga/issues/19

Stack trace from 10.0 revno 4427

mysqld: 10.0/sql/protocol.cc:522: void Protocol::end_statement(): Assertion `0' failed.
141005  2:07:44 [ERROR] mysqld got signal 6 ;
 
#6  0x00007f43b969b6f1 in *__GI___assert_fail (assertion=0xef70d0 "0", file=<optimized out>, line=522, function=0xef85e0 "void Protocol::end_statement()") at assert.c:81
#7  0x00000000005d2bab in Protocol::end_statement (this=0x7f43a0f175f8) at 10.0/sql/protocol.cc:522
#8  0x0000000000679aba in dispatch_command (command=COM_QUERY, thd=0x7f43a0f17070, packet=0x7f43a0e18071 "alter table t1 add unique index (a)", packet_length=35) at 10.0/sql/sql_parse.cc:1728
#9  0x0000000000677a31 in do_command (thd=0x7f43a0f17070) at 10.0/sql/sql_parse.cc:1004
#10 0x00000000007942a6 in do_handle_one_connection (thd_arg=0x7f43a0f17070) at 10.0/sql/sql_connect.cc:1379
#11 0x0000000000793ff9 in handle_one_connection (arg=0x7f43a0f17070) at 10.0/sql/sql_connect.cc:1293
#12 0x00007f43bb254b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#13 0x00007f43b974c20d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

Test case

# For MTR, replace it with however Mroonga should be properly initialized there
 
source ./storage/mroonga/data/install.sql;
 
create table t1 (a int) engine=Mroonga;
insert into t1 values (1),(1);
alter table t1 add unique index (a);



 Comments   
Comment by Kouhei Sutou [ 2015-08-16 ]

I've fixed it.
Could you confirm again with the latest MariaDB 10.0?

Comment by Elena Stepanova [ 2015-09-04 ]

Appears to be fixed back in 10.0.15:

MariaDB [test]> alter table t1 add unique index (a);
ERROR 1169 (23000): Can't write, because of unique constraint, to table 't1'

Generated at Thu Feb 08 07:14:57 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.