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
c2a7768b
Commit
c2a7768b
authored
Jul 29, 2003
by
bar@bar.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A new separate error message: Unknown collation 'blablabla'
parent
6a46d28e
Changes
33
Show whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
51 additions
and
8 deletions
+51
-8
include/mysqld_error.h
include/mysqld_error.h
+2
-1
mysql-test/r/ctype_collate.result
mysql-test/r/ctype_collate.result
+5
-1
mysql-test/r/variables.result
mysql-test/r/variables.result
+2
-0
mysql-test/t/ctype_collate.test
mysql-test/t/ctype_collate.test
+6
-1
mysql-test/t/variables.test
mysql-test/t/variables.test
+2
-0
sql/item_strfunc.cc
sql/item_strfunc.cc
+7
-1
sql/set_var.cc
sql/set_var.cc
+1
-1
sql/share/czech/errmsg.txt
sql/share/czech/errmsg.txt
+1
-0
sql/share/danish/errmsg.txt
sql/share/danish/errmsg.txt
+1
-0
sql/share/dutch/errmsg.txt
sql/share/dutch/errmsg.txt
+1
-0
sql/share/english/errmsg.txt
sql/share/english/errmsg.txt
+1
-0
sql/share/estonian/errmsg.txt
sql/share/estonian/errmsg.txt
+1
-0
sql/share/french/errmsg.txt
sql/share/french/errmsg.txt
+1
-0
sql/share/german/errmsg.txt
sql/share/german/errmsg.txt
+1
-0
sql/share/greek/errmsg.txt
sql/share/greek/errmsg.txt
+1
-0
sql/share/hungarian/errmsg.txt
sql/share/hungarian/errmsg.txt
+1
-0
sql/share/italian/errmsg.txt
sql/share/italian/errmsg.txt
+1
-0
sql/share/japanese/errmsg.txt
sql/share/japanese/errmsg.txt
+1
-0
sql/share/korean/errmsg.txt
sql/share/korean/errmsg.txt
+1
-0
sql/share/norwegian-ny/errmsg.txt
sql/share/norwegian-ny/errmsg.txt
+1
-0
sql/share/norwegian/errmsg.txt
sql/share/norwegian/errmsg.txt
+1
-0
sql/share/polish/errmsg.txt
sql/share/polish/errmsg.txt
+1
-0
sql/share/portuguese/errmsg.txt
sql/share/portuguese/errmsg.txt
+1
-0
sql/share/romanian/errmsg.txt
sql/share/romanian/errmsg.txt
+1
-0
sql/share/russian/errmsg.txt
sql/share/russian/errmsg.txt
+1
-0
sql/share/serbian/errmsg.txt
sql/share/serbian/errmsg.txt
+1
-0
sql/share/slovak/errmsg.txt
sql/share/slovak/errmsg.txt
+1
-0
sql/share/spanish/errmsg.txt
sql/share/spanish/errmsg.txt
+1
-0
sql/share/swedish/errmsg.txt
sql/share/swedish/errmsg.txt
+1
-0
sql/share/ukrainian/errmsg.txt
sql/share/ukrainian/errmsg.txt
+1
-0
sql/sql_db.cc
sql/sql_db.cc
+1
-1
sql/sql_lex.cc
sql/sql_lex.cc
+1
-1
sql/sql_yacc.yy
sql/sql_yacc.yy
+1
-1
No files found.
include/mysqld_error.h
View file @
c2a7768b
...
...
@@ -287,4 +287,5 @@
#define ER_CANT_AGGREGATE_3COLLATIONS 1268
#define ER_CANT_AGGREGATE_NCOLLATIONS 1269
#define ER_VARIABLE_IS_NOT_STRUCT 1270
#define ER_ERROR_MESSAGES 271
#define ER_UNKNOWN_COLLATION 1271
#define ER_ERROR_MESSAGES 272
mysql-test/r/ctype_collate.result
View file @
c2a7768b
...
...
@@ -7,6 +7,10 @@ CREATE TABLE t2 (
latin1_f CHAR(32) CHARACTER SET latin1 COLLATE koi8r_general_ci NOT NULL
);
ERROR 42000: COLLATION 'koi8r_general_ci' is not valid for CHARACTER SET 'latin1'
CREATE TABLE t2 (
latin1_f CHAR(32) CHARACTER SET latin1 COLLATE some_non_existing_col NOT NULL
);
ERROR HY000: Unknown collation: 'some_non_existing_col'
INSERT INTO t1 (latin1_f) VALUES (_latin1'A');
INSERT INTO t1 (latin1_f) VALUES (_latin1'a');
INSERT INTO t1 (latin1_f) VALUES (_latin1'AD');
...
...
@@ -482,7 +486,7 @@ y
Z
z
SELECT DISTINCT latin1_f COLLATE koi8r FROM t1;
ERROR
42000: COLLATION 'koi8r' is not valid for CHARACTER SET 'latin1
'
ERROR
HY000: Unknown collation: 'koi8r
'
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
...
...
mysql-test/r/variables.result
View file @
c2a7768b
...
...
@@ -184,6 +184,8 @@ set GLOBAL table_type=DEFAULT;
ERROR 42000: Variable 'table_type' doesn't have a default value
set character_set_client=UNKNOWN_CHARACTER_SET;
ERROR 42000: Unknown character set: 'UNKNOWN_CHARACTER_SET'
set collation_connection=UNKNOWN_COLLATION;
ERROR HY000: Unknown collation: 'UNKNOWN_COLLATION'
set global autocommit=1;
ERROR HY000: Variable 'autocommit' is a LOCAL variable and can't be used with SET GLOBAL
select @@global.timestamp;
...
...
mysql-test/t/ctype_collate.test
View file @
c2a7768b
...
...
@@ -12,6 +12,11 @@ CREATE TABLE t2 (
latin1_f
CHAR
(
32
)
CHARACTER
SET
latin1
COLLATE
koi8r_general_ci
NOT
NULL
);
--
error
1271
CREATE
TABLE
t2
(
latin1_f
CHAR
(
32
)
CHARACTER
SET
latin1
COLLATE
some_non_existing_col
NOT
NULL
);
INSERT
INTO
t1
(
latin1_f
)
VALUES
(
_latin1
'A'
);
INSERT
INTO
t1
(
latin1_f
)
VALUES
(
_latin1
'a'
);
...
...
@@ -93,7 +98,7 @@ SELECT DISTINCT latin1_f COLLATE latin1_swedish_ci FROM t1;
SELECT
DISTINCT
latin1_f
COLLATE
latin1_german2_ci
FROM
t1
;
SELECT
DISTINCT
latin1_f
COLLATE
latin1_general_ci
FROM
t1
;
SELECT
DISTINCT
latin1_f
COLLATE
latin1_bin
FROM
t1
;
--
error
12
5
1
--
error
12
7
1
SELECT
DISTINCT
latin1_f
COLLATE
koi8r
FROM
t1
;
...
...
mysql-test/t/variables.test
View file @
c2a7768b
...
...
@@ -120,6 +120,8 @@ set SESSION query_cache_size=10000;
set
GLOBAL
table_type
=
DEFAULT
;
--
error
1115
set
character_set_client
=
UNKNOWN_CHARACTER_SET
;
--
error
1271
set
collation_connection
=
UNKNOWN_COLLATION
;
--
error
1228
set
global
autocommit
=
1
;
--
error
1228
...
...
sql/item_strfunc.cc
View file @
c2a7768b
...
...
@@ -2206,7 +2206,13 @@ void Item_func_set_collation::fix_length_and_dec()
set_collation
=
get_charset_by_csname
(
args
[
0
]
->
charset
()
->
csname
,
MY_CS_BINSORT
,
MYF
(
0
));
else
set_collation
=
get_charset_by_name
(
colname
,
MYF
(
0
));
{
if
(
!
(
set_collation
=
get_charset_by_name
(
colname
,
MYF
(
0
))))
{
my_error
(
ER_UNKNOWN_COLLATION
,
MYF
(
0
),
colname
);
return
;
}
}
if
(
!
set_collation
||
!
my_charset_same
(
args
[
0
]
->
charset
(),
set_collation
))
{
...
...
sql/set_var.cc
View file @
c2a7768b
...
...
@@ -1240,7 +1240,7 @@ bool sys_var_collation::check(THD *thd, set_var *var)
if
(
!
(
tmp
=
get_charset_by_name
(
res
->
c_ptr
(),
MYF
(
0
))))
{
my_error
(
ER_UNKNOWN_C
HARACTER_SET
,
MYF
(
0
),
res
->
c_ptr
());
my_error
(
ER_UNKNOWN_C
OLLATION
,
MYF
(
0
),
res
->
c_ptr
());
return
1
;
}
var
->
save_result
.
charset
=
tmp
;
// Save for update
...
...
sql/share/czech/errmsg.txt
View file @
c2a7768b
...
...
@@ -276,3 +276,4 @@ v/*
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
sql/share/danish/errmsg.txt
View file @
c2a7768b
...
...
@@ -270,3 +270,4 @@
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
sql/share/dutch/errmsg.txt
View file @
c2a7768b
...
...
@@ -278,3 +278,4 @@
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
sql/share/english/errmsg.txt
View file @
c2a7768b
...
...
@@ -272,3 +272,4 @@
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
sql/share/estonian/errmsg.txt
View file @
c2a7768b
...
...
@@ -272,3 +272,4 @@
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
sql/share/french/errmsg.txt
View file @
c2a7768b
...
...
@@ -267,3 +267,4 @@
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
sql/share/german/errmsg.txt
View file @
c2a7768b
...
...
@@ -276,3 +276,4 @@
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
sql/share/greek/errmsg.txt
View file @
c2a7768b
...
...
@@ -267,3 +267,4 @@
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
sql/share/hungarian/errmsg.txt
View file @
c2a7768b
...
...
@@ -269,3 +269,4 @@
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
sql/share/italian/errmsg.txt
View file @
c2a7768b
...
...
@@ -267,3 +267,4 @@
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
sql/share/japanese/errmsg.txt
View file @
c2a7768b
...
...
@@ -269,3 +269,4 @@
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
sql/share/korean/errmsg.txt
View file @
c2a7768b
...
...
@@ -267,3 +267,4 @@
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
sql/share/norwegian-ny/errmsg.txt
View file @
c2a7768b
...
...
@@ -269,3 +269,4 @@
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
sql/share/norwegian/errmsg.txt
View file @
c2a7768b
...
...
@@ -269,3 +269,4 @@
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
sql/share/polish/errmsg.txt
View file @
c2a7768b
...
...
@@ -271,3 +271,4 @@
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
sql/share/portuguese/errmsg.txt
View file @
c2a7768b
...
...
@@ -267,3 +267,4 @@
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
sql/share/romanian/errmsg.txt
View file @
c2a7768b
...
...
@@ -271,3 +271,4 @@
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
sql/share/russian/errmsg.txt
View file @
c2a7768b
...
...
@@ -269,3 +269,4 @@
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
sql/share/serbian/errmsg.txt
View file @
c2a7768b
...
...
@@ -263,3 +263,4 @@
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
sql/share/slovak/errmsg.txt
View file @
c2a7768b
...
...
@@ -275,3 +275,4 @@
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
sql/share/spanish/errmsg.txt
View file @
c2a7768b
...
...
@@ -268,3 +268,4 @@
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
sql/share/swedish/errmsg.txt
View file @
c2a7768b
...
...
@@ -267,3 +267,4 @@
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
sql/share/ukrainian/errmsg.txt
View file @
c2a7768b
...
...
@@ -272,3 +272,4 @@
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
sql/sql_db.cc
View file @
c2a7768b
...
...
@@ -127,7 +127,7 @@ static bool load_db_opt(THD *thd, const char *path, HA_CREATE_INFO *create)
{
if
(
!
(
create
->
table_charset
=
get_charset_by_name
(
pos
+
1
,
MYF
(
0
))))
{
sql_print_error
(
ER
(
ER_UNKNOWN_C
HARACTER_SET
),
pos
+
1
);
sql_print_error
(
ER
(
ER_UNKNOWN_C
OLLATION
),
pos
+
1
);
}
}
}
...
...
sql/sql_lex.cc
View file @
c2a7768b
...
...
@@ -552,7 +552,7 @@ int yylex(void *arg, void *yythd)
/*
Note: "SELECT _bla AS 'alias'"
_bla should be considered as a IDENT if charset haven't been found.
So we don't use MYF(MY_WME) with get_charset_by_name to avoid
So we don't use MYF(MY_WME) with get_charset_by_
cs
name to avoid
producing an error.
*/
...
...
sql/sql_yacc.yy
View file @
c2a7768b
...
...
@@ -1410,7 +1410,7 @@ collation_name:
{
if (!($$=get_charset_by_name($1.str,MYF(0))))
{
net_printf(YYTHD,ER_UNKNOWN_C
HARACTER_SET
,$1.str);
net_printf(YYTHD,ER_UNKNOWN_C
OLLATION
,$1.str);
YYABORT;
}
};
...
...
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