Commit 73803763 authored by Sergei Petrunia's avatar Sergei Petrunia

MDEV-14293: MyRocks lacks basic functionality

Adjust the fix according to the review input: don't introduce a special
error caode, use ER_INTERNAL_ERROR catch-all.
parent 64b11e61
......@@ -7752,7 +7752,3 @@ ER_GEOJSON_EMPTY_COORDINATES
ER_MYROCKS_CANT_NOPAD_COLLATION
eng "MyRocks doesn't currently support collations with \"No pad\" attribute."
ER_MYROCKS_COLLATION_IS_LIMITED
eng "Indexed column %s.%s uses a collation that does not allow index-only access in secondary key and has reduced disk space efficiency in primary key."
......@@ -6121,9 +6121,15 @@ int ha_rocksdb::create_cfs(
table_arg->key_info[i].key_part[part].field) &&
!rdb_collation_exceptions->matches(tablename_sys)) {
my_error(ER_MYROCKS_COLLATION_IS_LIMITED, MYF(ME_JUST_WARNING),
tbl_def_arg->full_tablename().c_str(),
table_arg->key_info[i].key_part[part].field->field_name);
char buf[1024];
my_snprintf(buf, sizeof(buf),
"Indexed column %s.%s uses a collation that does not "
"allow index-only access in secondary key and has "
"reduced disk space efficiency in primary key.",
tbl_def_arg->full_tablename().c_str(),
table_arg->key_info[i].key_part[part].field->field_name);
my_error(ER_INTERNAL_ERROR, MYF(ME_JUST_WARNING), buf);
}
}
}
......
......@@ -287,7 +287,7 @@ CREATE TABLE t1 (a INT, b TEXT collate utf8_general_ci);
# MariaDB no longer gives ER_UNSUPPORTED_COLLATION
ALTER TABLE t1 ADD KEY kb(b(10));
Warnings:
Warning 4078 Indexed column test.t1.b uses a collation that does not allow index-only access in secondary key and has reduced disk space efficiency in primary key.
Warning 1815 Internal error: Indexed column test.t1.b uses a collation that does not allow index-only access in secondary key and has reduced disk space efficiency in primary key.
ALTER TABLE t1 ADD PRIMARY KEY(a);
DROP TABLE t1;
set global rocksdb_strict_collation_check= @tmp_rocksdb_strict_collation_check;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment