Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
a285e680
Commit
a285e680
authored
Dec 12, 2017
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.2 into bb-10.2-ext
parents
8695c816
e12f77a7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
57 additions
and
11 deletions
+57
-11
mysql-test/suite/sql_sequence/alter.result
mysql-test/suite/sql_sequence/alter.result
+1
-1
mysql-test/suite/sql_sequence/create.result
mysql-test/suite/sql_sequence/create.result
+7
-7
sql/share/errmsg-utf8.txt
sql/share/errmsg-utf8.txt
+3
-0
storage/rocksdb/ha_rocksdb.cc
storage/rocksdb/ha_rocksdb.cc
+24
-3
storage/rocksdb/mysql-test/rocksdb/r/mariadb_port_fixes.result
...ge/rocksdb/mysql-test/rocksdb/r/mariadb_port_fixes.result
+9
-0
storage/rocksdb/mysql-test/rocksdb/t/mariadb_port_fixes.test
storage/rocksdb/mysql-test/rocksdb/t/mariadb_port_fixes.test
+13
-0
No files found.
mysql-test/suite/sql_sequence/alter.result
View file @
a285e680
...
...
@@ -212,7 +212,7 @@ ERROR 42S02: 'test.t1' is not a SEQUENCE
drop table t1;
alter sequence if exists t1 minvalue=100;
Warnings:
Note 409
0
Unknown SEQUENCE: 'test.t1'
Note 409
1
Unknown SEQUENCE: 'test.t1'
alter sequence t1 minvalue=100;
ERROR 42S02: Table 'test.t1' doesn't exist
create sequence t1;
...
...
mysql-test/suite/sql_sequence/create.result
View file @
a285e680
...
...
@@ -165,7 +165,7 @@ drop sequence t1;
ERROR 42S02: 'test.t1' is not a SEQUENCE
drop sequence if exists t1;
Warnings:
Note 409
0
Unknown SEQUENCE: 'test.t1'
Note 409
1
Unknown SEQUENCE: 'test.t1'
create sequence t1 start with 10 maxvalue=9;
ERROR HY000: Sequence 'test.t1' values are conflicting
create sequence t1 minvalue= 100 maxvalue=10;
...
...
@@ -377,7 +377,7 @@ key key1 (next_not_cached_value)
ERROR HY000: Sequence 'test.t1' table structure is invalid (Sequence tables cannot have any keys)
drop sequence if exists t1;
Warnings:
Note 409
0
Unknown SEQUENCE: 'test.t1'
Note 409
1
Unknown SEQUENCE: 'test.t1'
create sequence t1;
create sequence t2;
create table t3 (a int) engine=myisam;
...
...
@@ -387,8 +387,8 @@ CREATE SEQUENCE s1;
drop sequence s1;
drop sequence if exists t1,t2,t3,t4;
Warnings:
Note 409
0
Unknown SEQUENCE: 'test.t3'
Note 409
0
Unknown SEQUENCE: 'test.t4'
Note 409
1
Unknown SEQUENCE: 'test.t3'
Note 409
1
Unknown SEQUENCE: 'test.t4'
drop table if exists t1,t2,t3;
Warnings:
Note 1051 Unknown table 'test.t1'
...
...
@@ -414,9 +414,9 @@ CREATE TABLE t2 (a int);
CREATE SEQUENCE s1;
drop sequence if exists t1,t2,s1,s2;
Warnings:
Note 409
0
Unknown SEQUENCE: 'test.t1'
Note 409
0
Unknown SEQUENCE: 'test.t2'
Note 409
0
Unknown SEQUENCE: 'test.s2'
Note 409
1
Unknown SEQUENCE: 'test.t1'
Note 409
1
Unknown SEQUENCE: 'test.t2'
Note 409
1
Unknown SEQUENCE: 'test.s2'
drop table if exists t1,t2;
CREATE TEMPORARY SEQUENCE s1;
DROP SEQUENCE s1;
...
...
sql/share/errmsg-utf8.txt
View file @
a285e680
...
...
@@ -7750,6 +7750,9 @@ ER_NET_OK_PACKET_TOO_LARGE
ER_GEOJSON_EMPTY_COORDINATES
eng "Incorrect GeoJSON format - empty 'coordinates' array."
ER_MYROCKS_CANT_NOPAD_COLLATION
eng "MyRocks doesn't currently support collations with \"No pad\" attribute."
ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
eng "Illegal parameter data types %s and %s for operation '%s'"
ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
...
...
storage/rocksdb/ha_rocksdb.cc
View file @
a285e680
...
...
@@ -5964,6 +5964,19 @@ rdb_is_index_collation_supported(const my_core::Field *const field) {
return
true
;
}
static
bool
rdb_field_uses_nopad_collation
(
const
my_core
::
Field
*
const
field
)
{
const
my_core
::
enum_field_types
type
=
field
->
real_type
();
/* Handle [VAR](CHAR|BINARY) or TEXT|BLOB */
if
(
type
==
MYSQL_TYPE_VARCHAR
||
type
==
MYSQL_TYPE_STRING
||
type
==
MYSQL_TYPE_BLOB
)
{
return
(
field
->
charset
()
->
state
&
MY_CS_NOPAD
);
}
return
false
;
}
/*
Create structures needed for storing data in rocksdb. This is called when the
table is created. The structures will be shared by all TABLE* objects.
...
...
@@ -6072,8 +6085,7 @@ int ha_rocksdb::create_cfs(
for
(
uint
i
=
0
;
i
<
tbl_def_arg
->
m_key_count
;
i
++
)
{
rocksdb
::
ColumnFamilyHandle
*
cf_handle
;
if
(
rocksdb_strict_collation_check
&&
!
is_hidden_pk
(
i
,
table_arg
,
tbl_def_arg
)
&&
if
(
!
is_hidden_pk
(
i
,
table_arg
,
tbl_def_arg
)
&&
tbl_def_arg
->
base_tablename
().
find
(
tmp_file_prefix
)
!=
0
)
{
if
(
!
tsys_set
)
{
...
...
@@ -6085,7 +6097,16 @@ int ha_rocksdb::create_cfs(
for
(
uint
part
=
0
;
part
<
table_arg
->
key_info
[
i
].
ext_key_parts
;
part
++
)
{
if
(
!
rdb_is_index_collation_supported
(
/* MariaDB: disallow NOPAD collations */
if
(
rdb_field_uses_nopad_collation
(
table_arg
->
key_info
[
i
].
key_part
[
part
].
field
))
{
my_error
(
ER_MYROCKS_CANT_NOPAD_COLLATION
,
MYF
(
0
));
DBUG_RETURN
(
HA_EXIT_FAILURE
);
}
if
(
rocksdb_strict_collation_check
&&
!
rdb_is_index_collation_supported
(
table_arg
->
key_info
[
i
].
key_part
[
part
].
field
)
&&
!
rdb_collation_exceptions
->
matches
(
tablename_sys
))
{
std
::
string
collation_err
;
...
...
storage/rocksdb/mysql-test/rocksdb/r/mariadb_port_fixes.result
View file @
a285e680
...
...
@@ -55,3 +55,12 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range a a 32 NULL # Using where
drop table t1,t2;
set global rocksdb_strict_collation_check=@tmp_rscc;
#
# MDEV-14389: MyRocks and NOPAD collations
#
create table t1 (pk varchar(10) collate latin1_nopad_bin, primary key(pk)) engine=rocksdb;
ERROR HY000: MyRocks doesn't currently support collations with "No pad" attribute.
set global rocksdb_strict_collation_check=off;
create table t1 (pk varchar(10) collate latin1_nopad_bin, primary key(pk)) engine=rocksdb;
ERROR HY000: MyRocks doesn't currently support collations with "No pad" attribute.
set global rocksdb_strict_collation_check=@tmp_rscc;
storage/rocksdb/mysql-test/rocksdb/t/mariadb_port_fixes.test
View file @
a285e680
...
...
@@ -54,3 +54,16 @@ explain select a from t2 where a <'zzz';
drop
table
t1
,
t2
;
set
global
rocksdb_strict_collation_check
=@
tmp_rscc
;
--
echo
#
--
echo
# MDEV-14389: MyRocks and NOPAD collations
--
echo
#
--
error
ER_MYROCKS_CANT_NOPAD_COLLATION
create
table
t1
(
pk
varchar
(
10
)
collate
latin1_nopad_bin
,
primary
key
(
pk
))
engine
=
rocksdb
;
set
global
rocksdb_strict_collation_check
=
off
;
--
error
ER_MYROCKS_CANT_NOPAD_COLLATION
create
table
t1
(
pk
varchar
(
10
)
collate
latin1_nopad_bin
,
primary
key
(
pk
))
engine
=
rocksdb
;
set
global
rocksdb_strict_collation_check
=@
tmp_rscc
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment