Details
Description
create sequence seq;
|
create table table1
|
(
|
id int default nextval(`seq`) not null primary key,
|
name varchar(200) default 'auto' not null
|
);
|
And run:
for a in `seq 1000`; do client/mariadb -S /tmp/build-mariadb-server-rebase.sock -Be 'execute immediate "SELECT
|
DEFAULT(name)
|
FROM table1";execute immediate "SELECT
|
DEFAULT(name)
|
FROM table1";execute immediate "SELECT
|
DEFAULT(name)' &
|
done
|
Need to start server with rasied max-connection (2k) and potentially more execute immediate SQL statements in the command line to trigger the race condition.
Will cause connection to error
1615 (HY000) FROM table1";' test
|
at line 1: Prepared statement needs to be re-prepared
|