Bug #108129 query with where lost connection after renaming column to lowercase from upper

Submitted: 12 Aug 2022 9:38 Modified: 18 Aug 2022 15:41
Reporter: Sucre Sucre Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Cluster NDB Operator Severity:S2 (Serious)
Version:8.0.21 OS:Red Hat (oracle linux7)
Assigned to: MySQL Verification Team CPU Architecture:x86

[12 Aug 2022 9:38] Sucre Sucre
Description:
Query with where clause got connection lost after renaming column from upper to lowercase.

How to repeat:
mysql> create table `t2` (`id` bigint not null auto_increment primary key, `BUG` varchar(64)) engine=ndbcluster;
Query OK, 0 rows affected (0.31 sec)

mysql> insert into t2(id) value(null);
Query OK, 1 row affected (0.00 sec)

mysql> select * from t2;
+----+------+
| id | BUG  |
+----+------+
|  1 | NULL |
+----+------+
1 row in set (0.01 sec)

mysql> select * from t2 where BUG is null;
+----+------+
| id | BUG  |
+----+------+
|  1 | NULL |
+----+------+
1 row in set (0.00 sec)

mysql> alter table t2 rename column BUG to bug;
Query OK, 0 rows affected (4.23 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> select * from t2 where BUG is null;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>

Suggested fix:
na
[15 Aug 2022 7:11] Sucre Sucre
mysql> select * from t2 where bug is null;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
[18 Aug 2022 15:41] MySQL Verification Team
Hi,

I cannot reproduce this with 8.0.29

node1 [localhost:29930] {msandbox} (test) > create table `t2` (`id` bigint not null auto_increment primary key, `BUG` varchar(64)) engine=ndbcluster;
Query OK, 0 rows affected (0.81 sec)

node1 [localhost:29930] {msandbox} (test) >  insert into t2(id) value(null);
Query OK, 1 row affected (0.04 sec)

node1 [localhost:29930] {msandbox} (test) > select * from t2;
+----+------+
| id | BUG  |
+----+------+
|  1 | NULL |
+----+------+
1 row in set (0.01 sec)

node1 [localhost:29930] {msandbox} (test) > select * from t2 where BUG is null;
+----+------+
| id | BUG  |
+----+------+
|  1 | NULL |
+----+------+
1 row in set (0.00 sec)

node1 [localhost:29930] {msandbox} (test) > alter table t2 rename column BUG to bug;
Query OK, 0 rows affected (0.30 sec)
Records: 0  Duplicates: 0  Warnings: 0

node1 [localhost:29930] {msandbox} (test) > select * from t2 where BUG is null;
+----+------+
| id | bug  |
+----+------+
|  1 | NULL |
+----+------+
1 row in set (0.00 sec)

node1 [localhost:29930] {msandbox} (test) > select @@version
    -> ;
+----------------+
| @@version      |
+----------------+
| 8.0.29-cluster |
+----------------+
1 row in set (0.00 sec)

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.051 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.