mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
Fix for bug#11766714 (former bug @59888) "debug assertion when
attempt to create spatial index on char > 31 bytes". Attempt to create spatial index on char field with length greater than 31 byte led to assertion failure on server compiled with safemutex support. The problem occurred in mi_create() function which was called to create a new version of table being altered. This function failed since it detected an attempt to create a spatial key on non-binary column and tried to return an error. On its error path it tried to unlock THR_LOCK_myisam mutex which has not been not locked at this point. Indeed such an incorrect behavior was caught by safemutex wrapper and caused assertion failure. This patch fixes the problem by ensuring that mi_create() doesn't releases THR_LOCK_myisam mutex on error path if it was not acquired. mysql-test/r/gis.result: Added test for bug @59888 "debug assertion when attempt to create spatial index on char > 31 bytes". mysql-test/t/gis.test: Added test for bug @59888 "debug assertion when attempt to create spatial index on char > 31 bytes". storage/myisam/mi_create.c: Changed mi_create() not to release THR_LOCK_myisam mutex on error path if it was not acquired.
This commit is contained in:
parent
867217156d
commit
9c89cca5e3
3 changed files with 29 additions and 7 deletions
|
|
@ -1034,4 +1034,12 @@ p
|
|||
NULL
|
||||
NULL
|
||||
drop table t1;
|
||||
#
|
||||
# Test for bug #59888 "debug assertion when attempt to create spatial index
|
||||
# on char > 31 bytes".
|
||||
#
|
||||
create table t1(a char(32) not null) engine=myisam;
|
||||
create spatial index i on t1 (a);
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 140)
|
||||
drop table t1;
|
||||
End of 5.1 tests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue