Skip to content

lowercase sql mode values are not supported #2701

@fanyang01

Description

@fanyang01

When playing MySQL Shell with this library (e.g., loading a MySQL dump), one of the obstacles I encountered is that mysqlsh sends lowercase SET sql_mode statement, which is not supported by go-mysql-server. This issue can be reproduced with the built-in example:

cd _example
go run .
mysql -h127.0.0.1 -uroot -P3306;
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 8.0.33 Dolt

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> set sql_mode = 'no_auto_value_on_zero';
ERROR 1105 (HY000): value no_auto_value_on_zero was not found in the set

mysql> set sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
Query OK, 1 row affected (0.00 sec)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions