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
6fdafa56
Commit
6fdafa56
authored
Jul 07, 2004
by
bar@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't allow badly formed UTF8 identitiers
parent
aa679b62
Changes
27
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
53 additions
and
1 deletion
+53
-1
include/mysqld_error.h
include/mysqld_error.h
+2
-1
mysql-test/r/ctype_recoding.result
mysql-test/r/ctype_recoding.result
+6
-0
mysql-test/t/ctype_recoding.test
mysql-test/t/ctype_recoding.test
+10
-0
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_yacc.yy
sql/sql_yacc.yy
+12
-0
No files found.
include/mysqld_error.h
View file @
6fdafa56
...
...
@@ -316,4 +316,5 @@
#define ER_GET_TEMPORARY_ERRMSG 1297
#define ER_UNKNOWN_TIME_ZONE 1298
#define ER_WARN_INVALID_TIMESTAMP 1299
#define ER_ERROR_MESSAGES 300
#define ER_INVALID_CHARACTER_STRING 1300
#define ER_ERROR_MESSAGES 301
mysql-test/r/ctype_recoding.result
View file @
6fdafa56
...
...
@@ -136,3 +136,9 @@ SET character_set_connection=binary;
SELECT 'тест' as s;
s
тест
SET NAMES binary;
CREATE TABLE `good` (a int);
ERROR HY000: Invalid utf8 character string: ''
SET NAMES utf8;
CREATE TABLE `good` (a int);
ERROR HY000: Invalid utf8 character string: '` (a int)'
mysql-test/t/ctype_recoding.test
View file @
6fdafa56
...
...
@@ -97,3 +97,13 @@ SELECT 'тест' as s;
SET
NAMES
utf8
;
SET
character_set_connection
=
binary
;
SELECT
'тест'
as
s
;
#
# Test that we allow only well-formed UTF8 identitiers
#
SET
NAMES
binary
;
--
error
1300
CREATE
TABLE
`good`
(
a
int
);
SET
NAMES
utf8
;
--
error
1300
CREATE
TABLE
`good`
(
a
int
);
sql/share/czech/errmsg.txt
View file @
6fdafa56
...
...
@@ -312,3 +312,4 @@ character-set=latin2
"Got temporary error %d '%-.100s' from %s",
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
sql/share/danish/errmsg.txt
View file @
6fdafa56
...
...
@@ -306,3 +306,4 @@ character-set=latin1
"Modtog temporary fejl %d '%-.100s' fra %s",
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
sql/share/dutch/errmsg.txt
View file @
6fdafa56
...
...
@@ -314,3 +314,4 @@ character-set=latin1
"Got temporary error %d '%-.100s' from %s",
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
sql/share/english/errmsg.txt
View file @
6fdafa56
...
...
@@ -303,3 +303,4 @@ character-set=latin1
"Got temporary error %d '%-.100s' from %s",
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
sql/share/estonian/errmsg.txt
View file @
6fdafa56
...
...
@@ -308,3 +308,4 @@ character-set=latin7
"Got temporary error %d '%-.100s' from %s",
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
sql/share/french/errmsg.txt
View file @
6fdafa56
...
...
@@ -303,3 +303,4 @@ character-set=latin1
"Got temporary error %d '%-.100s' from %s",
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
sql/share/german/errmsg.txt
View file @
6fdafa56
...
...
@@ -315,3 +315,4 @@ character-set=latin1
"Got temporary error %d '%-.100s' from %s",
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
sql/share/greek/errmsg.txt
View file @
6fdafa56
...
...
@@ -303,3 +303,4 @@ character-set=greek
"Got temporary error %d '%-.100s' from %s",
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
sql/share/hungarian/errmsg.txt
View file @
6fdafa56
...
...
@@ -305,3 +305,4 @@ character-set=latin2
"Got temporary error %d '%-.100s' from %s",
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
sql/share/italian/errmsg.txt
View file @
6fdafa56
...
...
@@ -303,3 +303,4 @@ character-set=latin1
"Got temporary error %d '%-.100s' from %s",
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
sql/share/japanese/errmsg.txt
View file @
6fdafa56
...
...
@@ -305,3 +305,4 @@ character-set=ujis
"Got temporary NDB error %d '%-.100s'",
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
sql/share/korean/errmsg.txt
View file @
6fdafa56
...
...
@@ -303,3 +303,4 @@ character-set=euckr
"Got temporary error %d '%-.100s' from %s",
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
sql/share/norwegian-ny/errmsg.txt
View file @
6fdafa56
...
...
@@ -305,3 +305,4 @@ character-set=latin1
"Mottok temporary feil %d '%-.100s' fra %s",
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
sql/share/norwegian/errmsg.txt
View file @
6fdafa56
...
...
@@ -305,3 +305,4 @@ character-set=latin1
"Mottok temporary feil %d '%-.100s' fra %s",
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
sql/share/polish/errmsg.txt
View file @
6fdafa56
...
...
@@ -307,3 +307,4 @@ character-set=latin2
"Got temporary error %d '%-.100s' from %s",
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
sql/share/portuguese/errmsg.txt
View file @
6fdafa56
...
...
@@ -304,3 +304,4 @@ character-set=latin1
"Got temporary error %d '%-.100s' from %s",
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
sql/share/romanian/errmsg.txt
View file @
6fdafa56
...
...
@@ -307,3 +307,4 @@ character-set=latin2
"Got temporary error %d '%-.100s' from %s",
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
sql/share/russian/errmsg.txt
View file @
6fdafa56
...
...
@@ -305,3 +305,4 @@ character-set=koi8r
"Got temporary error %d '%-.100s' from %s",
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
sql/share/serbian/errmsg.txt
View file @
6fdafa56
...
...
@@ -309,3 +309,4 @@ character-set=cp1250
"Got temporary error %d '%-.100s' from %s",
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
sql/share/slovak/errmsg.txt
View file @
6fdafa56
...
...
@@ -311,3 +311,4 @@ character-set=latin2
"Got temporary error %d '%-.100s' from %s",
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
sql/share/spanish/errmsg.txt
View file @
6fdafa56
...
...
@@ -305,3 +305,4 @@ character-set=latin1
"Got temporary error %d '%-.100s' from %s",
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
sql/share/swedish/errmsg.txt
View file @
6fdafa56
...
...
@@ -303,3 +303,4 @@ character-set=latin1
"Fick tilfällig felkod %d '%-.100s' från %s",
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
sql/share/ukrainian/errmsg.txt
View file @
6fdafa56
...
...
@@ -308,3 +308,4 @@ character-set=koi8u
"Got temporary error %d '%-.100s' from %s",
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
sql/sql_yacc.yy
View file @
6fdafa56
...
...
@@ -4884,7 +4884,19 @@ IDENT_sys:
{
THD *thd= YYTHD;
if (thd->charset_is_system_charset)
{
CHARSET_INFO *cs= system_charset_info;
uint wlen= cs->cset->well_formed_len(cs, $1.str,
$1.str+$1.length,
$1.length);
if (wlen < $1.length)
{
net_printf(YYTHD, ER_INVALID_CHARACTER_STRING, cs->csname,
$1.str + wlen);
YYABORT;
}
$$= $1;
}
else
thd->convert_string(&$$, system_charset_info,
$1.str, $1.length, thd->charset());
...
...
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