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
6b8d6d2a
Commit
6b8d6d2a
authored
Mar 30, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ALTER TABLE t1 CONVERT TO should also change the default character set.
Forgot to do it in the previous commit.
parent
acd4d158
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
mysql-test/r/alter_table.result
mysql-test/r/alter_table.result
+1
-1
mysql-test/t/alter_table.test
mysql-test/t/alter_table.test
+1
-1
sql/sql_yacc.yy
sql/sql_yacc.yy
+6
-2
No files found.
mysql-test/r/alter_table.result
View file @
6b8d6d2a
...
...
@@ -360,7 +360,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` char(10) character set koi8r default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t1 CONVERT TO CHARACTER SET latin1
, DEFAULT CHARACTER SET latin1
;
alter table t1 CONVERT TO CHARACTER SET latin1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
...
...
mysql-test/t/alter_table.test
View file @
6b8d6d2a
...
...
@@ -214,7 +214,7 @@ select a,hex(a) from t1;
show
create
table
t1
;
alter
table
t1
DEFAULT
CHARACTER
SET
latin1
;
show
create
table
t1
;
alter
table
t1
CONVERT
TO
CHARACTER
SET
latin1
,
DEFAULT
CHARACTER
SET
latin1
;
alter
table
t1
CONVERT
TO
CHARACTER
SET
latin1
;
show
create
table
t1
;
alter
table
t1
DEFAULT
CHARACTER
SET
cp1251
;
show
create
table
t1
;
...
...
sql/sql_yacc.yy
View file @
6b8d6d2a
...
...
@@ -1797,8 +1797,12 @@ alter_list_item:
$5->name,$4->csname);
YYABORT;
}
Lex->create_info.table_charset= $5;
Lex->create_info.used_fields|= HA_CREATE_USED_CHARSET;
LEX *lex= Lex;
lex->create_info.table_charset= $5;
lex->create_info.used_fields|= HA_CREATE_USED_CHARSET;
lex->create_info.default_table_charset= $5;
lex->create_info.used_fields|= HA_CREATE_USED_DEFAULT_CHARSET;
lex->simple_alter= 0;
}
| create_table_options_space_separated { Lex->simple_alter=0; }
| order_clause { Lex->simple_alter=0; };
...
...
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