pingcap/tidb

Creating functional index with null column name worked in tidb

Open

#31.149 aperta il 29 dic 2021

Vedi su GitHub
 (1 commento) (0 reazioni) (1 assegnatario)Go (6186 fork)batch import
help wantedseverity/moderatesig/sql-infratype/bug

Metriche repository

Star
 (40.090 star)
Metriche merge PR
 (Merge medio 14g 4h) (346 PR mergiate in 30 g)

Descrizione

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE t(a INT, b INT, INDEX c((null)));

2. What did you expect to see? (Required)

mysql> CREATE TABLE t(a INT, b INT, INDEX c((null)));
ERROR 3761 (HY000): The used storage engine cannot index the expression 'NULL'.

3. What did you see instead (Required)

mysql> CREATE TABLE t(a INT, b INT, INDEX c((null)));
Query OK, 0 rows affected (0.07 sec)

mysql> show create table t;
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                                              |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| t     | CREATE TABLE `t` (
  `a` int(11) DEFAULT NULL,
  `b` int(11) DEFAULT NULL,
  KEY `c` ((null))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

4. What is your TiDB version? (Required)

| Release Version: v5.3.0
Edition: Community
Git Commit Hash: 4a1b2e9fe5b5afb1068c56de47adb07098d768d6
Git Branch: heads/refs/tags/v5.3.0
UTC Build Time: 2021-11-24 13:31:24
GoVersion: go1.16.5
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |

Guida contributor