summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2004-07-07 16:39:43 +0500
committerunknown <bar@mysql.com>2004-07-07 16:39:43 +0500
commitd4eaed031b2eb1d8beaacc3dce9a27b4fcaa72e7 (patch)
treea8807f4b7e03e61c61669fb10cebf0fa23c53ae2 /mysql-test
parentb9ffd7386cfaf2ba36e9cbd85473ca0c3f12024a (diff)
downloadmariadb-git-d4eaed031b2eb1d8beaacc3dce9a27b4fcaa72e7.tar.gz
Don't allow badly formed UTF8 identitiers
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/ctype_recoding.result6
-rw-r--r--mysql-test/t/ctype_recoding.test10
2 files changed, 16 insertions, 0 deletions
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);