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
6b84badc
Commit
6b84badc
authored
Jul 14, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A test for character conversion in ALTER TABLE was added
parent
b38f212f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
0 deletions
+66
-0
mysql-test/r/alter_table.result
mysql-test/r/alter_table.result
+39
-0
mysql-test/t/alter_table.test
mysql-test/t/alter_table.test
+27
-0
No files found.
mysql-test/r/alter_table.result
View file @
6b84badc
...
@@ -281,3 +281,42 @@ ALTER TABLE t1 DISABLE KEYS;
...
@@ -281,3 +281,42 @@ ALTER TABLE t1 DISABLE KEYS;
INSERT DELAYED INTO t1 VALUES(1),(2),(3);
INSERT DELAYED INTO t1 VALUES(1),(2),(3);
ALTER TABLE t1 ENABLE KEYS;
ALTER TABLE t1 ENABLE KEYS;
drop table t1;
drop table t1;
set names koi8r;
create table t1 (a char(10) character set koi8r);
insert into t1 values ('');
select a,hex(a) from t1;
a hex(a)
D4C5D3D4
alter table t1 change a a char(10) character set cp1251;
select a,hex(a) from t1;
a hex(a)
F2E5F1F2
alter table t1 change a a char(10) binary;
select a,hex(a) from t1;
a hex(a)
F2E5F1F2
alter table t1 change a a char(10) character set cp1251;
select a,hex(a) from t1;
a hex(a)
F2E5F1F2
alter table t1 change a a char(10) character set koi8r;
select a,hex(a) from t1;
a hex(a)
D4C5D3D4
alter table t1 change a a varchar(10) character set cp1251;
select a,hex(a) from t1;
a hex(a)
F2E5F1F2
alter table t1 change a a char(10) character set koi8r;
select a,hex(a) from t1;
a hex(a)
D4C5D3D4
alter table t1 change a a text character set cp1251;
select a,hex(a) from t1;
a hex(a)
F2E5F1F2
alter table t1 change a a char(10) character set koi8r;
select a,hex(a) from t1;
a hex(a)
D4C5D3D4
drop table t1;
mysql-test/t/alter_table.test
View file @
6b84badc
...
@@ -144,3 +144,30 @@ ALTER TABLE t1 DISABLE KEYS;
...
@@ -144,3 +144,30 @@ ALTER TABLE t1 DISABLE KEYS;
INSERT
DELAYED
INTO
t1
VALUES
(
1
),(
2
),(
3
);
INSERT
DELAYED
INTO
t1
VALUES
(
1
),(
2
),(
3
);
ALTER
TABLE
t1
ENABLE
KEYS
;
ALTER
TABLE
t1
ENABLE
KEYS
;
drop
table
t1
;
drop
table
t1
;
#
# Test that data get converted when character set is changed
# Test that data doesn't get converted when src or dst is BINARY/BLOB
#
set
names
koi8r
;
create
table
t1
(
a
char
(
10
)
character
set
koi8r
);
insert
into
t1
values
(
''
);
select
a
,
hex
(
a
)
from
t1
;
alter
table
t1
change
a
a
char
(
10
)
character
set
cp1251
;
select
a
,
hex
(
a
)
from
t1
;
alter
table
t1
change
a
a
char
(
10
)
binary
;
select
a
,
hex
(
a
)
from
t1
;
alter
table
t1
change
a
a
char
(
10
)
character
set
cp1251
;
select
a
,
hex
(
a
)
from
t1
;
alter
table
t1
change
a
a
char
(
10
)
character
set
koi8r
;
select
a
,
hex
(
a
)
from
t1
;
alter
table
t1
change
a
a
varchar
(
10
)
character
set
cp1251
;
select
a
,
hex
(
a
)
from
t1
;
alter
table
t1
change
a
a
char
(
10
)
character
set
koi8r
;
select
a
,
hex
(
a
)
from
t1
;
alter
table
t1
change
a
a
text
character
set
cp1251
;
select
a
,
hex
(
a
)
from
t1
;
alter
table
t1
change
a
a
char
(
10
)
character
set
koi8r
;
select
a
,
hex
(
a
)
from
t1
;
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