Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.6, 10.10(EOL), 10.11, 11.1(EOL), 11.2(EOL), 11.3(EOL)
Description
Database version: 11.3.2-MariaDB-1:11.3.2+maria~ubu2204
Bug found with SQLancer.
Running OPTIMIZE TABLE t0 NOWAIT on two separate databases
concurrently might result in the error: Got error -2 "Internal error < 0 (Not system error)" from storage engine InnoDB
| Table | Op | Msg_type | Msg_text |
|
+--------------+----------+----------+---------------------------------------------------------------------------------+
|
| database1.t0 | optimize | note | Table does not support optimize, doing recreate + analyze instead |
|
| database1.t0 | optimize | error | Got error -2 "Internal error < 0 (Not system error)" from storage engine InnoDB |
|
| database1.t0 | optimize | status | Operation failed |
|
+--------------+----------+----------+---------------------------------------------------------------------------------+
|
3 rows in set, 1 warning (0.099 sec)
|
The error does not get thrown all the time, so to reproduce I had to run the queries in a loop on two separate processes.
This can be done using the following script. The bug should appear in about a minute of running.
#! /usr/bin/env bash
|
|
query="
|
DROP DATABASE IF EXISTS ${1};
|
CREATE DATABASE ${1};
|
USE ${1};
|
CREATE TABLE t0(c0 INT);
|
OPTIMIZE TABLE t0 NOWAIT;
|
"
|
|
while :
|
do
|
mariadb -h 127.0.01 -uroot -proot -f -v -v -v <<< $query |& grep "Internal error" -C 3
|
done
|
ie
./test.sh database1
./test.sh database2