1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Don't allow badly formed UTF8 identitiers

This commit is contained in:
bar@mysql.com
2004-07-07 16:39:43 +05:00
parent aa679b62c0
commit 6fdafa5635
27 changed files with 53 additions and 1 deletions

View File

@ -136,3 +136,9 @@ SET character_set_connection=binary;
SELECT 'тест' as s;
s
тест
SET NAMES binary;
CREATE TABLE `good<6F><64><EFBFBD><EFBFBD><EFBFBD>` (a int);
ERROR HY000: Invalid utf8 character string: '<27><><EFBFBD><EFBFBD><EFBFBD>'
SET NAMES utf8;
CREATE TABLE `good<6F><64><EFBFBD><EFBFBD><EFBFBD>` (a int);
ERROR HY000: Invalid utf8 character string: '<27><><EFBFBD><EFBFBD><EFBFBD>` (a int)'

View File

@ -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<6F><64><EFBFBD><EFBFBD><EFBFBD>` (a int);
SET NAMES utf8;
--error 1300
CREATE TABLE `good<6F><64><EFBFBD><EFBFBD><EFBFBD>` (a int);