Skip to content

Commit a3638d5

Browse files
JaySon-Huangti-chi-bot
authored andcommitted
This is an automated cherry-pick of #10178
Signed-off-by: ti-chi-bot <[email protected]>
1 parent 189d3bf commit a3638d5

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Copyright 2025 PingCAP, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
mysql> drop table if exists test.t;
16+
17+
# test for null expression express tiflash#9891
18+
mysql> CREATE TABLE test.t (id int);
19+
mysql> alter table test.t set tiflash replica 1;
20+
mysql> insert test.t values(0),(1);
21+
22+
func> wait_table test t
23+
24+
mysql> insert into test.t values (2), (3);
25+
mysql> set session tidb_isolation_read_engines='tiflash'; select * from test.t order by id;
26+
+----+
27+
| id |
28+
+----+
29+
| 0 |
30+
| 1 |
31+
| 2 |
32+
| 3 |
33+
+----+
34+
35+
mysql> CREATE INDEX idx_n ON test.t ((null));
36+
ERROR 3761 (HY000) at line 1: The used storage engine cannot index the expression 'null'
37+
38+
mysql> drop table if exists test.t;
39+
40+
mysql> CREATE TABLE test.t (id int, KEY idx_name ((null)));
41+
ERROR 3761 (HY000) at line 1: The used storage engine cannot index the expression 'null'
42+
mysql> drop table if exists test.t;

0 commit comments

Comments
 (0)