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
c4977323
Commit
c4977323
authored
Dec 19, 2003
by
bar@bar.intranet.mysql.r18.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into bar.intranet.mysql.r18.ru:/usr/home/bar/mysql-4.1
parents
7dfcc949
5be2b8b1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
5 deletions
+65
-5
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
mysql-test/r/ctype_create.result
mysql-test/r/ctype_create.result
+20
-0
mysql-test/t/ctype_create.test
mysql-test/t/ctype_create.test
+39
-0
mysys/charset2html.c
mysys/charset2html.c
+1
-1
sql/sql_db.cc
sql/sql_db.cc
+4
-4
No files found.
BitKeeper/etc/logging_ok
View file @
c4977323
...
@@ -12,6 +12,7 @@ antony@ltantony.rdg.cyberkinetica.homeunix.net
...
@@ -12,6 +12,7 @@ antony@ltantony.rdg.cyberkinetica.homeunix.net
arjen@co3064164-a.bitbike.com
arjen@co3064164-a.bitbike.com
arjen@fred.bitbike.com
arjen@fred.bitbike.com
arjen@george.bitbike.com
arjen@george.bitbike.com
bar@bar.intranet.mysql.r18.ru
bar@bar.mysql.r18.ru
bar@bar.mysql.r18.ru
bar@bar.udmsearch.izhnet.ru
bar@bar.udmsearch.izhnet.ru
bar@gw.udmsearch.izhnet.ru
bar@gw.udmsearch.izhnet.ru
...
...
mysql-test/r/ctype_create.result
0 → 100644
View file @
c4977323
SET @@character_set_server=latin5;
CREATE DATABASE db1 DEFAULT CHARACTER SET cp1251;
USE db1;
CREATE DATABASE db2;
SHOW CREATE DATABASE db1;
Database Create Database
db1 CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET cp1251 */
SHOW CREATE DATABASE db2;
Database Create Database
db2 CREATE DATABASE `db2` /*!40100 DEFAULT CHARACTER SET latin5 */
DROP DATABASE db2;
USE db1;
CREATE TABLE t1 (a char(10));
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(10) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=cp1251
DROP TABLE t1;
DROP DATABASE db1;
mysql-test/t/ctype_create.test
0 → 100644
View file @
c4977323
#
# Test for various CREATE statements and character sets
#
# Check that the database charset is taken from server charset by default:
# - Change local character_set_server variable to latin5.
# - Create database with and without CHARACTER SET specification.
# At the same time check fix for the
# Bug#2151:
# "USE db" with non-default character set should never affect
# further CREATE DATABASEs.
SET
@@
character_set_server
=
latin5
;
CREATE
DATABASE
db1
DEFAULT
CHARACTER
SET
cp1251
;
USE
db1
;
CREATE
DATABASE
db2
;
#
# This should be cp1251
#
SHOW
CREATE
DATABASE
db1
;
#
# This should take the default latin5 value from server level.
#
SHOW
CREATE
DATABASE
db2
;
DROP
DATABASE
db2
;
#
# Check that table value uses database level by default
#
USE
db1
;
CREATE
TABLE
t1
(
a
char
(
10
));
SHOW
CREATE
TABLE
t1
;
DROP
TABLE
t1
;
DROP
DATABASE
db1
;
mysys/charset2html.c
View file @
c4977323
...
@@ -81,7 +81,7 @@ static void print_cs(CHARSET_INFO *cs)
...
@@ -81,7 +81,7 @@ static void print_cs(CHARSET_INFO *cs)
printf
(
"<TR bgcolor=#%s>"
,
clr
?
"DDDDDD"
:
"EEEE99"
);
printf
(
"<TR bgcolor=#%s>"
,
clr
?
"DDDDDD"
:
"EEEE99"
);
printf
(
"<TD>%02X"
,
ch
[
i
].
cod
);
printf
(
"<TD>%02X"
,
ch
[
i
].
cod
);
printf
(
"<TD>%04X"
,
ch
[
i
].
uni
);
printf
(
"<TD>%04X"
,
ch
[
i
].
uni
);
printf
(
"<TD>%
d
"
,
ch
[
i
].
srt
);
printf
(
"<TD>%
02X
"
,
ch
[
i
].
srt
);
printf
(
"<TD>%s%s%s%s%s%s%s%s"
,
printf
(
"<TD>%s%s%s%s%s%s%s%s"
,
ch
[
i
].
ctp
&
_U
?
"U"
:
""
,
ch
[
i
].
ctp
&
_U
?
"U"
:
""
,
...
...
sql/sql_db.cc
View file @
c4977323
...
@@ -62,7 +62,7 @@ static bool write_db_opt(THD *thd, const char *path, HA_CREATE_INFO *create)
...
@@ -62,7 +62,7 @@ static bool write_db_opt(THD *thd, const char *path, HA_CREATE_INFO *create)
ulong
length
;
ulong
length
;
CHARSET_INFO
*
cs
=
(
create
&&
create
->
default_table_charset
)
?
CHARSET_INFO
*
cs
=
(
create
&&
create
->
default_table_charset
)
?
create
->
default_table_charset
:
create
->
default_table_charset
:
thd
->
variables
.
collation_
database
;
thd
->
variables
.
collation_
server
;
length
=
my_sprintf
(
buf
,(
buf
,
length
=
my_sprintf
(
buf
,(
buf
,
"default-character-set=%s
\n
default-collation=%s
\n
"
,
"default-character-set=%s
\n
default-collation=%s
\n
"
,
cs
->
csname
,
cs
->
name
));
cs
->
csname
,
cs
->
name
));
...
@@ -101,7 +101,7 @@ static bool load_db_opt(THD *thd, const char *path, HA_CREATE_INFO *create)
...
@@ -101,7 +101,7 @@ static bool load_db_opt(THD *thd, const char *path, HA_CREATE_INFO *create)
uint
nbytes
;
uint
nbytes
;
bzero
((
char
*
)
create
,
sizeof
(
*
create
));
bzero
((
char
*
)
create
,
sizeof
(
*
create
));
create
->
default_table_charset
=
global_system_variables
.
collation_database
;
create
->
default_table_charset
=
thd
->
variables
.
collation_server
;
if
((
file
=
my_open
(
path
,
O_RDONLY
|
O_SHARE
,
MYF
(
0
)))
>=
0
)
if
((
file
=
my_open
(
path
,
O_RDONLY
|
O_SHARE
,
MYF
(
0
)))
>=
0
)
{
{
IO_CACHE
cache
;
IO_CACHE
cache
;
...
@@ -290,7 +290,7 @@ int mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create_info)
...
@@ -290,7 +290,7 @@ int mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create_info)
{
{
thd
->
db_charset
=
(
create_info
&&
create_info
->
default_table_charset
)
?
thd
->
db_charset
=
(
create_info
&&
create_info
->
default_table_charset
)
?
create_info
->
default_table_charset
:
create_info
->
default_table_charset
:
global_system_variables
.
collation_database
;
thd
->
variables
.
collation_server
;
thd
->
variables
.
collation_database
=
thd
->
db_charset
;
thd
->
variables
.
collation_database
=
thd
->
db_charset
;
}
}
...
@@ -665,7 +665,7 @@ bool mysql_change_db(THD *thd, const char *name)
...
@@ -665,7 +665,7 @@ bool mysql_change_db(THD *thd, const char *name)
load_db_opt
(
thd
,
path
,
&
create
);
load_db_opt
(
thd
,
path
,
&
create
);
thd
->
db_charset
=
create
.
default_table_charset
?
thd
->
db_charset
=
create
.
default_table_charset
?
create
.
default_table_charset
:
create
.
default_table_charset
:
global_system_variables
.
collation_database
;
thd
->
variables
.
collation_server
;
thd
->
variables
.
collation_database
=
thd
->
db_charset
;
thd
->
variables
.
collation_database
=
thd
->
db_charset
;
DBUG_RETURN
(
0
);
DBUG_RETURN
(
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