From d4eaed031b2eb1d8beaacc3dce9a27b4fcaa72e7 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 7 Jul 2004 16:39:43 +0500 Subject: Don't allow badly formed UTF8 identitiers --- mysql-test/r/ctype_recoding.result | 6 ++++++ mysql-test/t/ctype_recoding.test | 10 ++++++++++ 2 files changed, 16 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/ctype_recoding.result b/mysql-test/r/ctype_recoding.result index d40360b9337..805f731f0ec 100644 --- a/mysql-test/r/ctype_recoding.result +++ b/mysql-test/r/ctype_recoding.result @@ -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)' diff --git a/mysql-test/t/ctype_recoding.test b/mysql-test/t/ctype_recoding.test index 45cc0cebfb3..de6332f272c 100644 --- a/mysql-test/t/ctype_recoding.test +++ b/mysql-test/t/ctype_recoding.test @@ -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); -- cgit v1.2.1