CREATE TABLE t0(c0 INT) PARTITION BY HASH((CASE WHEN 0 THEN 0 ELSE c0 END )) PARTITIONS 1; -- ERROR 1105 (HY000): UnknownType: *ast.WhenClause
When executing the CREATE, an internal error message is printed:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.7.25-TiDB- TiDB Server (Apache License 2.0), MySQL 5.7 compatible
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
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 TABLE t0(c0 INT) PARTITION BY HASH((CASE WHEN 0 THEN 0 ELSE c0 END )) PARTITIONS 1;
ERROR 1105 (HY000): UnknownType: *ast.WhenClause
I would expect that either an error is printed, explaining that this operator is forbidden, or that this operator is supported. For example, MySQL 8.0.19 prints This partition function is not allowed for this case.
I can reproduce this both in the 4.0 RC, and on the latest master (commit 72f457674238d28435b874af2899f7f684140a49).
Consider the following statements:
When executing the
CREATE
, an internal error message is printed:I would expect that either an error is printed, explaining that this operator is forbidden, or that this operator is supported. For example, MySQL 8.0.19 prints
This partition function is not allowed
for this case.I can reproduce this both in the 4.0 RC, and on the latest master (commit 72f457674238d28435b874af2899f7f684140a49).
Environment:
According to your classification, this seems to be a P2 bug (
Incompatible behaviors, such as permissions, SQL errors, etc.
).