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
b3e5861a
Commit
b3e5861a
authored
Mar 15, 2006
by
jani@ibmlab.site
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a test case for Bug#18038 MySQL server corrupts binary columns data
parent
4700bb93
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
0 deletions
+38
-0
mysql-test/r/alter_table.result
mysql-test/r/alter_table.result
+20
-0
mysql-test/t/alter_table.test
mysql-test/t/alter_table.test
+18
-0
No files found.
mysql-test/r/alter_table.result
View file @
b3e5861a
...
@@ -621,3 +621,23 @@ create table t1 (t varchar(255) default null, key t (t(80)))
...
@@ -621,3 +621,23 @@ create table t1 (t varchar(255) default null, key t (t(80)))
engine=myisam default charset=latin1;
engine=myisam default charset=latin1;
alter table t1 change t t text;
alter table t1 change t t text;
drop table t1;
drop table t1;
CREATE TABLE t1 (s CHAR(8) BINARY);
INSERT INTO t1 VALUES ('test');
SELECT LENGTH(s) FROM t1;
LENGTH(s)
4
ALTER TABLE t1 MODIFY s CHAR(10) BINARY;
SELECT LENGTH(s) FROM t1;
LENGTH(s)
4
DROP TABLE t1;
CREATE TABLE t1 (s BINARY(8));
INSERT INTO t1 VALUES ('test');
SELECT LENGTH(s) FROM t1;
LENGTH(s)
8
ALTER TABLE t1 MODIFY s BINARY(10);
SELECT LENGTH(s) FROM t1;
LENGTH(s)
10
DROP TABLE t1;
mysql-test/t/alter_table.test
View file @
b3e5861a
...
@@ -449,3 +449,21 @@ create table t1 (t varchar(255) default null, key t (t(80)))
...
@@ -449,3 +449,21 @@ create table t1 (t varchar(255) default null, key t (t(80)))
engine
=
myisam
default
charset
=
latin1
;
engine
=
myisam
default
charset
=
latin1
;
alter
table
t1
change
t
t
text
;
alter
table
t1
change
t
t
text
;
drop
table
t1
;
drop
table
t1
;
#
# Bug#18038 MySQL server corrupts binary columns data
#
CREATE
TABLE
t1
(
s
CHAR
(
8
)
BINARY
);
INSERT
INTO
t1
VALUES
(
'test'
);
SELECT
LENGTH
(
s
)
FROM
t1
;
ALTER
TABLE
t1
MODIFY
s
CHAR
(
10
)
BINARY
;
SELECT
LENGTH
(
s
)
FROM
t1
;
DROP
TABLE
t1
;
CREATE
TABLE
t1
(
s
BINARY
(
8
));
INSERT
INTO
t1
VALUES
(
'test'
);
SELECT
LENGTH
(
s
)
FROM
t1
;
ALTER
TABLE
t1
MODIFY
s
BINARY
(
10
);
SELECT
LENGTH
(
s
)
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