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 ...@@ -7752,7 +7752,3 @@ ER_GEOJSON_EMPTY_COORDINATES
ER_MYROCKS_CANT_NOPAD_COLLATION ER_MYROCKS_CANT_NOPAD_COLLATION
eng "MyRocks doesn't currently support collations with \"No pad\" attribute." 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( ...@@ -6121,9 +6121,15 @@ int ha_rocksdb::create_cfs(
table_arg->key_info[i].key_part[part].field) && table_arg->key_info[i].key_part[part].field) &&
!rdb_collation_exceptions->matches(tablename_sys)) { !rdb_collation_exceptions->matches(tablename_sys)) {
my_error(ER_MYROCKS_COLLATION_IS_LIMITED, MYF(ME_JUST_WARNING), char buf[1024];
tbl_def_arg->full_tablename().c_str(), my_snprintf(buf, sizeof(buf),
table_arg->key_info[i].key_part[part].field->field_name); "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); ...@@ -287,7 +287,7 @@ CREATE TABLE t1 (a INT, b TEXT collate utf8_general_ci);
# MariaDB no longer gives ER_UNSUPPORTED_COLLATION # MariaDB no longer gives ER_UNSUPPORTED_COLLATION
ALTER TABLE t1 ADD KEY kb(b(10)); ALTER TABLE t1 ADD KEY kb(b(10));
Warnings: 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); ALTER TABLE t1 ADD PRIMARY KEY(a);
DROP TABLE t1; DROP TABLE t1;
set global rocksdb_strict_collation_check= @tmp_rocksdb_strict_collation_check; 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