Bug #107638 | Assertion in val_real() failed in MySQL 8.0.29 | ||
---|---|---|---|
Submitted: | 23 Jun 2022 4:53 | Modified: | 16 Aug 2022 23:25 |
Reporter: | Wang Ke | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S6 (Debug Builds) |
Version: | 8.0.29 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | assertion failure |
[23 Jun 2022 4:53]
Wang Ke
[23 Jun 2022 6:12]
MySQL Verification Team
Hello Wang Ke, Thank you for the report and test case. Observed that 8.0.29 debug build is affected with provided test case. regards, Umesh
[23 Jun 2022 6:14]
MySQL Verification Team
- 8.0.29 release build not affected rm -rf 107638/ bin/mysqld --no-defaults --initialize-insecure --basedir=$PWD --datadir=$PWD/107638 --log-error-verbosity=3 bin/mysqld_safe --no-defaults --basedir=$PWD --datadir=$PWD/107638 --core-file --socket=/tmp/mysql.sock --port=3306 --log-error=$PWD/107638/log.err --mysqlx-port=33330 --mysqlx-socket=/tmp/mysql_x_ushastry.sock --log-error-verbosity=3 --secure-file-priv="" --local-infile=1 2>&1 & bin/mysql -uroot -S /tmp/mysql.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7 Server version: 8.0.29 MySQL Community Server - GPL Copyright (c) 2000, 2022, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> create database test; Query OK, 1 row affected (0.01 sec) mysql> use test Database changed mysql> CREATE TABLE t1 ( k INT , KEY ( k ) ) ENGINE = MyISAM ; Query OK, 0 rows affected (0.00 sec) mysql> INSERT INTO t1 VALUES ( 1 ) ; Query OK, 1 row affected (0.01 sec) mysql> SELECT t1 . k FROM t1 WHERE MATCH ( t1 . k ) AGAINST ( 'deadbeef' IN BOOLEAN MODE ) AND t1 . k = 1 ORDER BY t1 . k DESC ; +------+ | k | +------+ | 1 | +------+ 1 row in set (0.00 sec) - 8.0.29 debug build affected rm -rf 107638/ bin/mysqld --no-defaults --initialize-insecure --basedir=$PWD --datadir=$PWD/107638 --log-error-verbosity=3 bin/mysqld_safe --no-defaults --mysqld-version=debug --basedir=$PWD --datadir=$PWD/107638 --core-file --socket=/tmp/mysql.sock --port=3306 --log-error=$PWD/107638/log.err --mysqlx-port=33330 --mysqlx-socket=/tmp/mysql_x_ushastry.sock --log-error-verbosity=3 --secure-file-priv="" --local-infile=1 2>&1 & bin/mysql -uroot -S /tmp/mysql.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7 Server version: 8.0.29-debug MySQL Community Server - GPL - Debug Copyright (c) 2000, 2022, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> create database test; Query OK, 1 row affected (0.01 sec) mysql> use test Database changed mysql> CREATE TABLE t1 ( k INT , KEY ( k ) ) ENGINE = MyISAM ; Query OK, 0 rows affected (0.01 sec) mysql> INSERT INTO t1 VALUES ( 1 ) ; Query OK, 1 row affected (0.01 sec) mysql> SELECT t1 . k FROM t1 WHERE MATCH ( t1 . k ) AGAINST ( 'deadbeef' IN BOOLEAN MODE ) AND t1 . k = 1 ORDER BY t1 . k DESC ; ERROR 2013 (HY000): Lost connection to MySQL server during query
[23 Jun 2022 6:23]
MySQL Verification Team
- 5.7.38 release/debug not affected bin/mysql -uroot -S /tmp/mysql.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.7.38-debug MySQL Community Server - Debug (GPL) Copyright (c) 2000, 2022, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> create database test1; Query OK, 1 row affected (0.00 sec) mysql> use test1 Database changed mysql> CREATE TABLE t1 ( k INT , KEY ( k ) ) ENGINE = MyISAM ; Query OK, 0 rows affected (0.00 sec) mysql> INSERT INTO t1 VALUES ( 1 ) ; Query OK, 1 row affected (0.00 sec) mysql> SELECT t1 . k FROM t1 WHERE MATCH ( t1 . k ) AGAINST ( 'deadbeef' IN BOOLEAN MODE ) AND t1 . k = 1 ORDER BY t1 . k DESC ; Empty set (0.00 sec)
[16 Aug 2022 23:25]
Jon Stephens
Documented fix as follows in the MySQL 8.0.31 changelog: A query performing a full-text search in boolean mode on a column of a MyISAM table led to an assertion in debug builds when the column was not of a string type. This was due to the fact that MyISAM allows MATCH columns without indexes in boolean mode, and therefore also allows integer columns, which are subject to constant propagation. Such queries on tables using any storage engine other than MyISAM were not affected by this issue. This is fixed by disabling constant propagation on the MATCH clause when the column is not of a string type, so that we can safely assume that it contains only column references. Closed.