1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix for bug #6166: index prefix length of 0 not rejected

This commit is contained in:
unknown
2004-10-26 12:16:35 +04:00
parent dc734355e6
commit 1ff580febc
3 changed files with 26 additions and 1 deletions

View File

@ -305,3 +305,5 @@ check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;
create table t1 (c char(10), index (c(0)));
ERROR HY000: Key part 'c' length cannot be 0

View File

@ -285,3 +285,14 @@ check table t1;
drop table t1;
#
# Bug 6166: index prefix length of 0 not rejected
#
# this test should fail in 5.0
# to fix it, remove #ifdef in
# file sql_yacc.yy(key_part)
# create dedicated error code for this and
# and change my_printf_error() to my_error
--error 1105
create table t1 (c char(10), index (c(0)));