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
3b60dc73
Commit
3b60dc73
authored
Feb 06, 2008
by
anozdrin/alik@quad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test case for Bug#21380: DEFAULT definition not always
transfered by CREATE TABLE/SELECT to the new table.
parent
bd4e8754
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
90 additions
and
0 deletions
+90
-0
mysql-test/r/create.result
mysql-test/r/create.result
+46
-0
mysql-test/t/create.test
mysql-test/t/create.test
+44
-0
No files found.
mysql-test/r/create.result
View file @
3b60dc73
...
@@ -1743,4 +1743,50 @@ t1 CREATE TABLE `t1` (
...
@@ -1743,4 +1743,50 @@ t1 CREATE TABLE `t1` (
`MAXLEN` bigint(3) NOT NULL DEFAULT '0'
`MAXLEN` bigint(3) NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8
) ENGINE=MEMORY DEFAULT CHARSET=utf8
drop table t1;
drop table t1;
# --
# -- Bug#21380: DEFAULT definition not always transfered by CREATE
# -- TABLE/SELECT to the new table.
# --
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
CREATE TABLE t1(
c1 INT DEFAULT 12 COMMENT 'column1',
c2 INT NULL COMMENT 'column2',
c3 INT NOT NULL COMMENT 'column3',
c4 VARCHAR(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
c5 VARCHAR(255) COLLATE utf8_unicode_ci NULL DEFAULT 'b',
c6 VARCHAR(255))
COLLATE ucs2_unicode_ci;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) DEFAULT '12' COMMENT 'column1',
`c2` int(11) DEFAULT NULL COMMENT 'column2',
`c3` int(11) NOT NULL COMMENT 'column3',
`c4` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
`c5` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'b',
`c6` varchar(255) COLLATE ucs2_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=ucs2 COLLATE=ucs2_unicode_ci
CREATE TABLE t2 AS SELECT * FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`c1` int(11) DEFAULT '12' COMMENT 'column1',
`c2` int(11) DEFAULT NULL COMMENT 'column2',
`c3` int(11) NOT NULL COMMENT 'column3',
`c4` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
`c5` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'b',
`c6` varchar(255) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
# -- End of test case for Bug#21380.
End of 5.1 tests
End of 5.1 tests
mysql-test/t/create.test
View file @
3b60dc73
...
@@ -1341,4 +1341,48 @@ create table t1 like information_schema.character_sets;
...
@@ -1341,4 +1341,48 @@ create table t1 like information_schema.character_sets;
show
create
table
t1
;
show
create
table
t1
;
drop
table
t1
;
drop
table
t1
;
--
echo
--
echo
# --
--
echo
# -- Bug#21380: DEFAULT definition not always transfered by CREATE
--
echo
# -- TABLE/SELECT to the new table.
--
echo
# --
--
echo
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
;
DROP
TABLE
IF
EXISTS
t2
;
--
enable_warnings
--
echo
CREATE
TABLE
t1
(
c1
INT
DEFAULT
12
COMMENT
'column1'
,
c2
INT
NULL
COMMENT
'column2'
,
c3
INT
NOT
NULL
COMMENT
'column3'
,
c4
VARCHAR
(
255
)
CHARACTER
SET
utf8
NOT
NULL
DEFAULT
'a'
,
c5
VARCHAR
(
255
)
COLLATE
utf8_unicode_ci
NULL
DEFAULT
'b'
,
c6
VARCHAR
(
255
))
COLLATE
ucs2_unicode_ci
;
--
echo
SHOW
CREATE
TABLE
t1
;
--
echo
CREATE
TABLE
t2
AS
SELECT
*
FROM
t1
;
--
echo
SHOW
CREATE
TABLE
t2
;
--
echo
DROP
TABLE
t2
;
--
echo
--
echo
# -- End of test case for Bug#21380.
--
echo
--
echo
End
of
5.1
tests
--
echo
End
of
5.1
tests
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