summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorunknown <malff/marcsql@weblab.(none)>2007-05-29 14:52:17 -0600
committerunknown <malff/marcsql@weblab.(none)>2007-05-29 14:52:17 -0600
commit5af525b0e118f0e23275f6bc33a323b6f7c658bc (patch)
treeb09fee48f0ce9d6d8c7fc524be731472506e4435 /tests
parentc6d61c752863289e461034b50ff566ab7c55c2dd (diff)
downloadmariadb-git-5af525b0e118f0e23275f6bc33a323b6f7c658bc.tar.gz
Manual merge
sql/sp_head.cc: Manual merge, bug#27876 sql/sql_lex.cc: Manual merge, bug#27876 sql/sql_lex.h: Manual merge, bug#27876 sql/sql_view.cc: Manual merge, bug#27876 tests/mysql_client_test.c: Manual merge, bug#27876
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql_client_test.c65
1 files changed, 65 insertions, 0 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 66eff66398f..ceb7e59a97b 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -16097,6 +16097,70 @@ static void test_bug28075()
}
#endif
+
+/*
+ Bug#27876 (SF with cyrillic variable name fails during execution (regression))
+*/
+static void test_bug27876()
+{
+ int rc;
+ MYSQL_RES *result;
+
+ char utf8_func[] =
+ {
+ 0xd1, 0x84, 0xd1, 0x83, 0xd0, 0xbd, 0xd0, 0xba,
+ 0xd1, 0x86, 0xd0, 0xb8, 0xd0, 0xb9, 0xd0, 0xba,
+ 0xd0, 0xb0,
+ 0x00
+ };
+
+ char utf8_param[] =
+ {
+ 0xd0, 0xbf, 0xd0, 0xb0, 0xd1, 0x80, 0xd0, 0xb0,
+ 0xd0, 0xbc, 0xd0, 0xb5, 0xd1, 0x82, 0xd1, 0x8a,
+ 0xd1, 0x80, 0x5f, 0xd0, 0xb2, 0xd0, 0xb5, 0xd1,
+ 0x80, 0xd1, 0x81, 0xd0, 0xb8, 0xd1, 0x8f,
+ 0x00
+ };
+
+ char query[500];
+
+ DBUG_ENTER("test_bug27876");
+ myheader("test_bug27876");
+
+ rc= mysql_query(mysql, "set names utf8");
+ myquery(rc);
+
+ rc= mysql_query(mysql, "select version()");
+ myquery(rc);
+ result= mysql_store_result(mysql);
+ mytest(result);
+
+ sprintf(query, "DROP FUNCTION IF EXISTS %s", utf8_func);
+ rc= mysql_query(mysql, query);
+ myquery(rc);
+
+ sprintf(query,
+ "CREATE FUNCTION %s( %s VARCHAR(25))"
+ " RETURNS VARCHAR(25) DETERMINISTIC RETURN %s",
+ utf8_func, utf8_param, utf8_param);
+ rc= mysql_query(mysql, query);
+ myquery(rc);
+ sprintf(query, "SELECT %s(VERSION())", utf8_func);
+ rc= mysql_query(mysql, query);
+ myquery(rc);
+ result= mysql_store_result(mysql);
+ mytest(result);
+
+ sprintf(query, "DROP FUNCTION %s", utf8_func);
+ rc= mysql_query(mysql, query);
+ myquery(rc);
+
+ rc= mysql_query(mysql, "set names default");
+ myquery(rc);
+}
+
+
/*
Read and parse arguments and MySQL options from my.cnf
*/
@@ -16384,6 +16448,7 @@ static struct my_tests_st my_tests[]= {
#ifdef fix_bug_in_pb_first
{ "test_bug28075", test_bug28075 },
#endif
+ { "test_bug27876", test_bug27876 },
{ 0, 0 }
};