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
6de458c2
Commit
6de458c2
authored
Nov 19, 2004
by
bar@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reuse ctype_common.inc instead of retyping
the same queries.
parent
f9d1a5a1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
13 deletions
+55
-13
mysql-test/r/ctype_big5.result
mysql-test/r/ctype_big5.result
+52
-4
mysql-test/t/ctype_big5.test
mysql-test/t/ctype_big5.test
+3
-9
No files found.
mysql-test/r/ctype_big5.result
View file @
6de458c2
drop table if exists t1;
drop table if exists t1;
SET NAMES big5;
SET @test_character_set= 'big5';
CREATE TABLE t1 (c CHAR(10) CHARACTER SET big5, KEY(c));
SET @test_collation= 'big5_chinese_ci';
SET @safe_character_set_server= @@character_set_server;
SET @safe_collation_server= @@collation_server;
SET character_set_server= @test_character_set;
SET collation_server= @test_collation;
CREATE DATABASE d1;
USE d1;
CREATE TABLE t1 (c CHAR(10), KEY(c));
SHOW FULL COLUMNS FROM t1;
Field Type Collation Null Key Default Extra Privileges Comment
c char(10) big5_chinese_ci YES MUL NULL select,insert,update,references
INSERT INTO t1 VALUES ('aaa'),('aaaa'),('aaaaa');
INSERT INTO t1 VALUES ('aaa'),('aaaa'),('aaaaa');
SELECT
*
FROM t1 WHERE c LIKE 'aaa%';
SELECT
c as want3results
FROM t1 WHERE c LIKE 'aaa%';
c
want3results
aaa
aaa
aaaa
aaaa
aaaaa
aaaaa
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (c1 varchar(15), KEY c1 (c1(2)));
SHOW FULL COLUMNS FROM t1;
Field Type Collation Null Key Default Extra Privileges Comment
c1 varchar(15) big5_chinese_ci YES MUL NULL select,insert,update,references
INSERT INTO t1 VALUES ('location'),('loberge'),('lotre'),('boabab');
SELECT c1 as want3results from t1 where c1 like 'l%';
want3results
location
loberge
lotre
SELECT c1 as want3results from t1 where c1 like 'lo%';
want3results
location
loberge
lotre
SELECT c1 as want1result from t1 where c1 like 'loc%';
want1result
location
SELECT c1 as want1result from t1 where c1 like 'loca%';
want1result
location
SELECT c1 as want1result from t1 where c1 like 'locat%';
want1result
location
SELECT c1 as want1result from t1 where c1 like 'locati%';
want1result
location
SELECT c1 as want1result from t1 where c1 like 'locatio%';
want1result
location
SELECT c1 as want1result from t1 where c1 like 'location%';
want1result
location
DROP TABLE t1;
DROP DATABASE d1;
USE test;
SET character_set_server= @safe_character_set_server;
SET collation_server= @safe_collation_server;
mysql-test/t/ctype_big5.test
View file @
6de458c2
...
@@ -7,12 +7,6 @@
...
@@ -7,12 +7,6 @@
drop
table
if
exists
t1
;
drop
table
if
exists
t1
;
--
enable_warnings
--
enable_warnings
SET
NAMES
big5
;
SET
@
test_character_set
=
'big5'
;
SET
@
test_collation
=
'big5_chinese_ci'
;
#
--
source
include
/
ctype_common
.
inc
# Bug 1883: LIKE did not work in some cases with a key.
#
CREATE
TABLE
t1
(
c
CHAR
(
10
)
CHARACTER
SET
big5
,
KEY
(
c
));
INSERT
INTO
t1
VALUES
(
'aaa'
),(
'aaaa'
),(
'aaaaa'
);
SELECT
*
FROM
t1
WHERE
c
LIKE
'aaa%'
;
DROP
TABLE
t1
;
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