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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
d4ca8b12
Commit
d4ca8b12
authored
Nov 06, 2009
by
Mikael Ronstrom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Review fixes for BUG#48161 and BUG#48447
parent
09580562
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
32 deletions
+55
-32
mysql-test/r/ctype_collate.result
mysql-test/r/ctype_collate.result
+30
-0
mysql-test/r/partition_column.result
mysql-test/r/partition_column.result
+7
-22
mysql-test/t/ctype_collate.test
mysql-test/t/ctype_collate.test
+12
-0
mysql-test/t/partition_column.test
mysql-test/t/partition_column.test
+6
-10
No files found.
mysql-test/r/ctype_collate.result
View file @
d4ca8b12
...
@@ -548,6 +548,36 @@ SELECT * FROM t1 WHERE s2 = s3;
...
@@ -548,6 +548,36 @@ SELECT * FROM t1 WHERE s2 = s3;
s1 s2 s3
s1 s2 s3
a A A
a A A
DROP TABLE t1;
DROP TABLE t1;
create table t1 (a varchar(1) character set latin1 collate latin1_general_ci);
insert into t1 values ('A'),('a'),('B'),('b'),('C'),('c');
select * from t1 where a > 'B' collate latin1_bin;
a
a
b
C
c
select * from t1 where a <> 'B' collate latin1_bin;
a
A
a
b
C
c
create index i on t1 (a);
select * from t1 where a > 'B' collate latin1_bin;
a
a
b
C
c
select * from t1 where a <> 'B' collate latin1_bin;
a
A
a
b
C
c
drop table t1;
SET NAMES latin1;
SET NAMES latin1;
CREATE TABLE t1
CREATE TABLE t1
(s1 char(10) COLLATE latin1_german1_ci,
(s1 char(10) COLLATE latin1_german1_ci,
...
...
mysql-test/r/partition_column.result
View file @
d4ca8b12
drop table if exists t1;
drop table if exists t1;
create table t1 (a varchar(1) character set latin1 collate latin1_general_ci);
create table t1 (a varchar(1) character set latin1 collate latin1_general_ci)
partition by range columns(a)
( partition p0 values less than ('a'),
partition p1 values less than ('b'),
partition p2 values less than ('c'),
partition p3 values less than ('d'));
insert into t1 values ('A'),('a'),('B'),('b'),('C'),('c');
insert into t1 values ('A'),('a'),('B'),('b'),('C'),('c');
select * from t1 where a > 'B' collate latin1_bin;
select * from t1 where a > 'B' collate latin1_bin;
a
a
...
@@ -14,27 +19,7 @@ a
...
@@ -14,27 +19,7 @@ a
b
b
C
C
c
c
create index i on t1 (a);
alter table t1 remove partitioning;
select * from t1 where a > 'B' collate latin1_bin;
a
a
b
C
c
select * from t1 where a <> 'B' collate latin1_bin;
a
A
a
b
C
c
drop index i on t1;
alter table t1
partition by range columns(a)
( partition p0 values less than ('a'),
partition p1 values less than ('b'),
partition p2 values less than ('c'),
partition p3 values less than ('d'));
select * from t1 where a > 'B' collate latin1_bin;
select * from t1 where a > 'B' collate latin1_bin;
a
a
a
a
...
...
mysql-test/t/ctype_collate.test
View file @
d4ca8b12
...
@@ -172,6 +172,18 @@ DROP TABLE t1;
...
@@ -172,6 +172,18 @@ DROP TABLE t1;
#
#
# Test that optimizer doesn't use indexes with wrong collation
# Test that optimizer doesn't use indexes with wrong collation
#
#
#
# BUG#48447, Delivering too few records with indexes using collate syntax
#
create
table
t1
(
a
varchar
(
1
)
character
set
latin1
collate
latin1_general_ci
);
insert
into
t1
values
(
'A'
),(
'a'
),(
'B'
),(
'b'
),(
'C'
),(
'c'
);
select
*
from
t1
where
a
>
'B'
collate
latin1_bin
;
select
*
from
t1
where
a
<>
'B'
collate
latin1_bin
;
create
index
i
on
t1
(
a
);
select
*
from
t1
where
a
>
'B'
collate
latin1_bin
;
select
*
from
t1
where
a
<>
'B'
collate
latin1_bin
;
drop
table
t1
;
SET
NAMES
latin1
;
SET
NAMES
latin1
;
CREATE
TABLE
t1
CREATE
TABLE
t1
(
s1
char
(
10
)
COLLATE
latin1_german1_ci
,
(
s1
char
(
10
)
COLLATE
latin1_german1_ci
,
...
...
mysql-test/t/partition_column.test
View file @
d4ca8b12
...
@@ -10,26 +10,22 @@ drop table if exists t1;
...
@@ -10,26 +10,22 @@ drop table if exists t1;
#
#
# BUG#48161, Delivering too few records using collate syntax with partitions
# BUG#48161, Delivering too few records using collate syntax with partitions
# BUG#48447, Delivering too few records with indexes using collate syntax
#
#
# Test case from BUG#48447 with some extension
# Test case from BUG#48447 with some extension
create
table
t1
(
a
varchar
(
1
)
character
set
latin1
collate
latin1_general_ci
);
create
table
t1
(
a
varchar
(
1
)
character
set
latin1
collate
latin1_general_ci
)
insert
into
t1
values
(
'A'
),(
'a'
),(
'B'
),(
'b'
),(
'C'
),(
'c'
);
select
*
from
t1
where
a
>
'B'
collate
latin1_bin
;
select
*
from
t1
where
a
<>
'B'
collate
latin1_bin
;
create
index
i
on
t1
(
a
);
select
*
from
t1
where
a
>
'B'
collate
latin1_bin
;
select
*
from
t1
where
a
<>
'B'
collate
latin1_bin
;
drop
index
i
on
t1
;
alter
table
t1
partition
by
range
columns
(
a
)
partition
by
range
columns
(
a
)
(
partition
p0
values
less
than
(
'a'
),
(
partition
p0
values
less
than
(
'a'
),
partition
p1
values
less
than
(
'b'
),
partition
p1
values
less
than
(
'b'
),
partition
p2
values
less
than
(
'c'
),
partition
p2
values
less
than
(
'c'
),
partition
p3
values
less
than
(
'd'
));
partition
p3
values
less
than
(
'd'
));
insert
into
t1
values
(
'A'
),(
'a'
),(
'B'
),(
'b'
),(
'C'
),(
'c'
);
select
*
from
t1
where
a
>
'B'
collate
latin1_bin
;
select
*
from
t1
where
a
<>
'B'
collate
latin1_bin
;
alter
table
t1
remove
partitioning
;
select
*
from
t1
where
a
>
'B'
collate
latin1_bin
;
select
*
from
t1
where
a
>
'B'
collate
latin1_bin
;
select
*
from
t1
where
a
<>
'B'
collate
latin1_bin
;
select
*
from
t1
where
a
<>
'B'
collate
latin1_bin
;
drop
table
t1
;
drop
table
t1
;
# Test case from BUG#48161
# Test case from BUG#48161
create
table
t1
(
a
varchar
(
2
)
character
set
latin1
,
create
table
t1
(
a
varchar
(
2
)
character
set
latin1
,
b
varchar
(
2
)
character
set
latin1
)
b
varchar
(
2
)
character
set
latin1
)
...
...
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