Bug #95929 | Duplicate entry for key 'PRIMARY' when querying information_schema.TABLES | ||
---|---|---|---|
Submitted: | 22 Jun 2019 23:08 | Modified: | 4 Mar 2020 19:36 |
Reporter: | Manuel Rigger | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Information schema | Severity: | S3 (Non-critical) |
Version: | 8.0.16 | OS: | Ubuntu |
Assigned to: | CPU Architecture: | x86 |
[22 Jun 2019 23:08]
Manuel Rigger
[24 Jun 2019 11:52]
MySQL Verification Team
Hello Manuel Rigger, Thank you for the report and test case. Verified as described with 8.0.16 build. regards, Umesh
[24 Jun 2019 11:52]
MySQL Verification Team
- MySQL server 8.0.16 rm -rf 95929/ bin/mysqld --initialize-insecure --basedir=$PWD --datadir=$PWD/95929 --log-error-verbosity=3 bin/mysqld --basedir=$PWD --datadir=$PWD/95929 --core-file --socket=/tmp/mysql_ushastry.sock --port=3333 --log-error=$PWD/95929/log.err --mysqlx-port=33330 --mysqlx-socket=/tmp/mysql_x_ushastry.sock --log-error-verbosity=3 --secure-file-priv=/tmp/ 2>&1 & - run provided java test case after adjusting environment details ant -f C:\\Work\\MySQLJava\\Bug95929 -Dnb.internal.action.name=run run init: deps-jar: Created dir: C:\Work\MySQLJava\Bug95929\build Updating property file: C:\Work\MySQLJava\Bug95929\build\built-jar.properties Created dir: C:\Work\MySQLJava\Bug95929\build\classes Created dir: C:\Work\MySQLJava\Bug95929\build\empty Created dir: C:\Work\MySQLJava\Bug95929\build\generated-sources\ap-source-output Compiling 1 source file to C:\Work\MySQLJava\Bug95929\build\classes compile: run: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry 'triggerbug30-t0' for key 'PRIMARY' at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:117) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:782) at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:666) at Bug95929$1.run(Bug95929.java:37) at java.base/java.lang.Thread.run(Thread.java:834) java.sql.SQLIntegrityConstraintViolationException: Duplicate entry 'triggerbug9-t0' for key 'PRIMARY' at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:117) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:782) at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:666) at Bug95929$1.run(Bug95929.java:37) at java.base/java.lang.Thread.run(Thread.java:834) java.sql.SQLIntegrityConstraintViolationException: Duplicate entry 'triggerbug20-t0' for key 'PRIMARY' at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:117) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:782) at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:666) at Bug95929$1.run(Bug95929.java:37) at java.base/java.lang.Thread.run(Thread.java:834) java.sql.SQLIntegrityConstraintViolationException: Duplicate entry 'triggerbug27-t0' for key 'PRIMARY' at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:117) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:782) at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:666) at Bug95929$1.run(Bug95929.java:37) at java.base/java.lang.Thread.run(Thread.java:834) java.sql.SQLIntegrityConstraintViolationException: Duplicate entry 'triggerbug26-t0' for key 'PRIMARY' at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:117) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:782) at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:666) at Bug95929$1.run(Bug95929.java:37) at java.base/java.lang.Thread.run(Thread.java:834) java.sql.SQLIntegrityConstraintViolationException: Duplicate entry 'triggerbug23-t0' for key 'PRIMARY' at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:117) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:782) at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:666) at Bug95929$1.run(Bug95929.java:37) at java.base/java.lang.Thread.run(Thread.java:834)
[4 Mar 2020 19:36]
Paul DuBois
Posted by developer: Fixed in 8.0.20. For INFORMATION_SCHEMA queries, a race condition could result in multiple attempts to insert a key when updating the dynamic statistics tables, producing a duplicate-key error.