Bug #114445 Possibly missing keyword escape

Submitted: 21 Mar 2024 14:12 Modified: 22 Mar 2024 8:42
Reporter: Pedro Ferreira Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DDL Severity:S3 (Non-critical)
Version:8.3.0 OS:Ubuntu (Ubuntu 22.04)
Assigned to: CPU Architecture:x86 (x86_64)
Tags: BINARY, collate, CREATE TABLE

[21 Mar 2024 14:12] Pedro Ferreira
Description:
I think this is related to Bug #110577. Run:

CREATE TABLE t0 (c0 VARCHAR(32) AS (_binary 'a' COLLATE `binary`));
--ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'binary))' at line 1

This: SELECT _binary 'a' COLLATE `binary`; runs fine.

I think the issue arises from `binary` being a keyword. The create table succeeds if I try with another charset and collation combination.

The compilation parameters are the same as issue 108148:

-DWITH_DEBUG=1 -DWITH_ASAN=ON -DWITH_UBSAN=ON and boost library version 1.77

How to repeat:
Run the statements above.
[22 Mar 2024 6:59] Pedro Ferreira
This morning I found another corner case:

mysql> CREATE TABLE t0 (c0 CHAR(1) AS (X''));
ERROR 1054 (42S22): Unknown column '0x' in 'generated column function'
[22 Mar 2024 7:01] Pedro Ferreira
Sorry for the last comment, it doesn't apply to version 8.3.0, but the initial case still applies.
[22 Mar 2024 8:42] MySQL Verification Team
Hello Pedro Ferreira,

Thank you for the report and feedback.
Verified as described.

regards,
Umesh

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

Page generated in 0.054 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.