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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
e456ef4b
Commit
e456ef4b
authored
Jan 20, 2009
by
Staale Smedseng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding a test to verify that Bug#27208 "If no current database,
character_set_database !=character_set_server" is fixed.
parent
2389815a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
mysql-test/r/character_set_database_func.result
mysql-test/r/character_set_database_func.result
+10
-0
mysql-test/t/character_set_database_func.test
mysql-test/t/character_set_database_func.test
+21
-0
No files found.
mysql-test/r/character_set_database_func.result
View file @
e456ef4b
...
...
@@ -2,6 +2,7 @@
SET @global_character_set_database = @@global.character_set_database;
SET @session_character_set_database = @@session.character_set_database;
SET @session_character_set_server = @@session.character_set_server;
SET @global_character_set_server = @@global.character_set_server;
SET @@global.character_set_database = utf8;
'connect (con1,localhost,root,,,,)'
'connection con1'
...
...
@@ -71,6 +72,15 @@ SELECT count(*) FROM t1 WHERE CHAR_LENGTH(a)>1;
count(*)
1
DROP TABLE IF EXISTS t1;
'Bug#27208: If no current database, character_set_database !=character_set_server'
SET GLOBAL character_set_server=latin5;
CREATE DATABASE csdb CHARACTER SET = utf8;
USE csdb;
DROP DATABASE csdb;
SELECT @@character_set_database;
@@character_set_database
latin5
SET @@global.character_set_database = @global_character_set_database;
SET @@session.character_set_database = @session_character_set_database;
SET @@session.character_set_server = @session_character_set_server;
SET @@global.character_set_server = @global_character_set_server;
mysql-test/t/character_set_database_func.test
View file @
e456ef4b
...
...
@@ -29,6 +29,7 @@
SET
@
global_character_set_database
=
@@
global
.
character_set_database
;
SET
@
session_character_set_database
=
@@
session
.
character_set_database
;
SET
@
session_character_set_server
=
@@
session
.
character_set_server
;
SET
@
global_character_set_server
=
@@
global
.
character_set_server
;
SET
@@
global
.
character_set_database
=
utf8
;
--
echo
'connect (con1,localhost,root,,,,)'
...
...
@@ -106,10 +107,30 @@ SELECT count(*) FROM t1 WHERE CHAR_LENGTH(a)>1;
DROP
TABLE
IF
EXISTS
t1
;
--
enable_warnings
#==============================================================================
--
echo
'Bug#27208: If no current database, character_set_database !=character_set_server'
#==============================================================================
SET
GLOBAL
character_set_server
=
latin5
;
connect
(
con2
,
localhost
,
root
,,);
connection
con2
;
CREATE
DATABASE
csdb
CHARACTER
SET
=
utf8
;
USE
csdb
;
DROP
DATABASE
csdb
;
SELECT
@@
character_set_database
;
connection
default
;
disconnect
con2
;
#restore
SET
@@
global
.
character_set_database
=
@
global_character_set_database
;
SET
@@
session
.
character_set_database
=
@
session_character_set_database
;
SET
@@
session
.
character_set_server
=
@
session_character_set_server
;
SET
@@
global
.
character_set_server
=
@
global_character_set_server
;
############################################################
# End of functionality Testing for character_set_database #
############################################################
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