Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: Document which sql_modes are supported #606

Closed
morgo opened this issue Sep 7, 2018 · 2 comments · Fixed by #728
Closed

sql: Document which sql_modes are supported #606

morgo opened this issue Sep 7, 2018 · 2 comments · Fixed by #728
Labels
status/TODO This issue is in a to-do list and will be fixed later.

Comments

@morgo
Copy link
Contributor

morgo commented Sep 7, 2018

In pingcap/tidb#2738 it mentions that TiDB should support more sql_modes, but it is not clear which existing modes are supported.

Because TiDB does not produce an error when setting an unsupported sql_mode, it is important that this be documented on sql/mysql-compatibility.md

@morgo morgo changed the title Document which sql_modes are supported sql: Document which sql_modes are supported Sep 7, 2018
@morgo
Copy link
Contributor Author

morgo commented Sep 7, 2018

An example showing the sql_mode of NO_ENGINE_SUBSTITUTION having no impact:

mysql> SELECT @@sql_mode;
+--------------------------------------------+
| @@sql_mode                                 |
+--------------------------------------------+
| STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION |
+--------------------------------------------+
1 row in set (0.00 sec)

mysql> CREATE TABLE t (a int) engine=idontexist;
Query OK, 0 rows affected (0.18 sec)

@jackysp jackysp added the status/TODO This issue is in a to-do list and will be fixed later. label Sep 17, 2018
@morgo
Copy link
Contributor Author

morgo commented Nov 8, 2018

Via the mysql docs. Here is my understanding so far:

Fully Supported

  • strict-trans-tables
  • ansi-quotes
  • no-auto-create-user (will merge soon)
  • strict-all-tables
  • NO_ZERO_IN_DATE
  • No_ZERO_DATE
  • PIPES_AS_CONCAT
  • error-for-division-by-zero
  • high-not-precedence
  • PAD_CHAR_TO_FULL_LENGTH
  • ignore space
  • no-auto-value-on-zero
  • no backslash escapes
  • no unsigned subtraction
  • REAL_AS_FLOAT

Partially supported

  • only-full-group-by (* minor semantic differences)
  • ansi (a combination mode; semantic diffs in only-full-group-by)
  • traditional (does not support no engine-substitution)

Not applicable

  • no-dir-in-create
  • no-engine-substitution

Deprecated, will not add

  • no field options
  • no key options
  • no table options
  • db2
  • maxdb
  • mssql
  • MYSQL323
  • mysql40
  • oracle
  • POSTGRESQL

unsupported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/TODO This issue is in a to-do list and will be fixed later.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants