1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

ctype_latin1.result, ctype_latin1.test, charset.c:

Treat unknown characters straight in a query as syntax error, rather skipping it as a space character.


mysys/charset.c:
  Treat unknown characters straight in a query as syntax error, rather skipping it as a space character.
mysql-test/t/ctype_latin1.test:
  Treat unknown characters straight in a query as syntax error, rather skipping it as a space character.
mysql-test/r/ctype_latin1.result:
  Treat unknown characters straight in a query as syntax error, rather skipping it as a space character.
This commit is contained in:
unknown
2005-02-22 09:56:07 +04:00
parent 1329f063c0
commit 14707d71c3
3 changed files with 15 additions and 1 deletions

View File

@ -325,3 +325,8 @@ latin1_bin 6109
latin1_bin 61
latin1_bin 6120
drop table t1;
CREATE TABLE <20>a (a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<27>a (a int)' at line 1
SELECT '<27>a' as str;
str
<EFBFBD>a

View File

@ -66,3 +66,12 @@ SET collation_connection='latin1_swedish_ci';
-- source include/ctype_filesort.inc
SET collation_connection='latin1_bin';
-- source include/ctype_filesort.inc
#
# Bug#8041
# An unknown character (e.g. 0x84) should result in ERROR,
# It was treated like a space character earlier.
# Howerver, it should still work fine as a string part.
--error 1064
CREATE TABLE <20>a (a int);
SELECT '<27>a' as str;

View File

@ -64,7 +64,7 @@ static my_bool init_state_maps(CHARSET_INFO *cs)
else if (my_mbcharlen(cs, i)>1)
state_map[i]=(uchar) MY_LEX_IDENT;
#endif
else if (!my_isgraph(cs,i))
else if (my_isspace(cs,i))
state_map[i]=(uchar) MY_LEX_SKIP;
else
state_map[i]=(uchar) MY_LEX_CHAR;