summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorunknown <monty@mishka.local>2005-08-25 06:55:48 +0300
committerunknown <monty@mishka.local>2005-08-25 06:55:48 +0300
commit173e5df37fb315099f9e89ce7d686528e24de5c5 (patch)
tree7dfaa1b1889d948f6f78eb4f70bcf87091e7f02d /tests
parentb11953834d8e9521fd3a2dfc4e2bffd26f865eb8 (diff)
parente0f9b8a807fb09df27b016d0ad3852e3320f72dd (diff)
downloadmariadb-git-173e5df37fb315099f9e89ce7d686528e24de5c5.tar.gz
Merge mishka.local:/home/my/mysql-4.1
into mishka.local:/home/my/mysql-5.0 BitKeeper/etc/ignore: auto-union BitKeeper/deleted/.del-Grep.cpp~ad798e9ae519d667: Auto merged BitKeeper/deleted/.del-Grep.hpp~b05e3af6cfabe387: Auto merged BitKeeper/deleted/.del-ctype_cp932.result: Auto merged BitKeeper/deleted/.del-ctype_cp932.test: Auto merged BitKeeper/deleted/.del-have_lowercase0.inc: Delete: mysql-test/include/have_lowercase0.inc VC++Files/mysql-test/mysql_test_run_new.dsp: Auto merged configure.in: Auto merged mysql-test/include/ps_conv.inc: Auto merged mysql-test/mysql-test-run.pl: Auto merged sql/ha_innodb.cc: Auto merged sql/mysql_priv.h: Auto merged sql/set_var.cc: Auto merged sql/examples/ha_archive.cc: Auto merged sql/examples/ha_example.cc: Auto merged sql/sql_table.cc: Auto merged support-files/mysql.spec.sh: Auto merged VC++Files/client/mysqltest.dsp: manual merge VC++Files/sql/mysqld.dsp: manual merge mysql-test/r/grant2.result: patch merge mysql-test/r/subselect2.result: manual merge mysql-test/t/grant2.test: patch merge mysys/charset.c: Remove already deleted function sql/examples/ha_archive.h: Manual merge sql/sql_acl.cc: manual merge sql/sql_db.cc: merge (no differences) sql/sql_select.cc: manual merge sql/table.h: merge (no differences) tests/mysql_client_test.c: patch merge
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql_client_test.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 75b41ebe4d1..4f1e6a72b91 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -14240,6 +14240,40 @@ static void test_bug12243()
}
/*
+ Bug#11718: query with function, join and order by returns wrong type
+*/
+
+static void test_bug11718()
+{
+ MYSQL_RES *res;
+ int rc;
+ const char *query= "select str_to_date(concat(f3),'%Y%m%d') from t1,t2 "
+ "where f1=f2 order by f1";
+
+ myheader("test_bug11718");
+
+ rc= mysql_query(mysql, "drop table if exists t1, t2");
+ myquery(rc);
+ rc= mysql_query(mysql, "create table t1 (f1 int)");
+ myquery(rc);
+ rc= mysql_query(mysql, "create table t2 (f2 int, f3 numeric(8))");
+ myquery(rc);
+ rc= mysql_query(mysql, "insert into t1 values (1), (2)");
+ myquery(rc);
+ rc= mysql_query(mysql, "insert into t2 values (1,20050101), (2,20050202)");
+ myquery(rc);
+ rc= mysql_query(mysql, query);
+ myquery(rc);
+ res = mysql_store_result(mysql);
+
+ if (!opt_silent)
+ printf("return type: %s", (res->fields[0].type == MYSQL_TYPE_DATE)?"DATE":
+ "not DATE");
+ DIE_UNLESS(res->fields[0].type == MYSQL_TYPE_DATE);
+ rc= mysql_query(mysql, "drop table t1, t2");
+ myquery(rc);
+}
+/*
Read and parse arguments and MySQL options from my.cnf
*/
@@ -14485,6 +14519,7 @@ static struct my_tests_st my_tests[]= {
{ "test_bug11037", test_bug11037 },
{ "test_bug10760", test_bug10760 },
{ "test_bug12001", test_bug12001 },
+ { "test_bug11718", test_bug11718 },
{ "test_bug11909", test_bug11909 },
{ "test_bug11901", test_bug11901 },
{ "test_bug12243", test_bug12243 },