diff options
author | evgen@sunlight.local <> | 2007-04-28 00:04:50 +0400 |
---|---|---|
committer | evgen@sunlight.local <> | 2007-04-28 00:04:50 +0400 |
commit | 4b5c387f5df7939c408f647c4b1d456a2f22aa8a (patch) | |
tree | f402ee6944894d6eb86a4cea8d8fa9f17ace0708 | |
parent | e0b8b6e596bc96972e53c6a754fbadcb30816bc8 (diff) | |
download | mariadb-git-4b5c387f5df7939c408f647c4b1d456a2f22aa8a.tar.gz |
Additional fix for the bug#27590.
-rw-r--r-- | mysql-test/r/ps_6bdb.result | 4 | ||||
-rw-r--r-- | mysql-test/r/ps_7ndb.result | 4 | ||||
-rw-r--r-- | sql/item_cmpfunc.cc | 4 | ||||
-rw-r--r-- | tests/mysql_client_test.c | 8 |
4 files changed, 10 insertions, 10 deletions
diff --git a/mysql-test/r/ps_6bdb.result b/mysql-test/r/ps_6bdb.result index e83a3944d4e..407dddb6f53 100644 --- a/mysql-test/r/ps_6bdb.result +++ b/mysql-test/r/ps_6bdb.result @@ -3053,7 +3053,7 @@ found true set @arg00= CAST('1991-01-01 01:01:01' as datetime) ; select 'true' as found from t9 -where c1= 20 and c13= CAST('1991-01-01 01:01:01' as datetime) and +where c1= 20 and c13= CAST('1991-01-01 00:00:00' as datetime) and c14= CAST('1991-01-01 01:01:01' as datetime) and c15= CAST('1991-01-01 01:01:01' as datetime) and c16= CAST('1991-01-01 01:01:01' as datetime) and @@ -3066,7 +3066,7 @@ and c17= @arg00 ; found true prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c13= CAST('1991-01-01 01:01:01' as datetime) and +where c1= 20 and c13= CAST('1991-01-01 00:00:00' as datetime) and c14= CAST('1991-01-01 01:01:01' as datetime) and c15= CAST('1991-01-01 01:01:01' as datetime) and c16= CAST('1991-01-01 01:01:01' as datetime) and diff --git a/mysql-test/r/ps_7ndb.result b/mysql-test/r/ps_7ndb.result index e8358098ee7..2673448489a 100644 --- a/mysql-test/r/ps_7ndb.result +++ b/mysql-test/r/ps_7ndb.result @@ -3053,7 +3053,7 @@ found true set @arg00= CAST('1991-01-01 01:01:01' as datetime) ; select 'true' as found from t9 -where c1= 20 and c13= CAST('1991-01-01 01:01:01' as datetime) and +where c1= 20 and c13= CAST('1991-01-01 00:00:00' as datetime) and c14= CAST('1991-01-01 01:01:01' as datetime) and c15= CAST('1991-01-01 01:01:01' as datetime) and c16= CAST('1991-01-01 01:01:01' as datetime) and @@ -3066,7 +3066,7 @@ and c17= @arg00 ; found true prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c13= CAST('1991-01-01 01:01:01' as datetime) and +where c1= 20 and c13= CAST('1991-01-01 00:00:00' as datetime) and c14= CAST('1991-01-01 01:01:01' as datetime) and c15= CAST('1991-01-01 01:01:01' as datetime) and c16= CAST('1991-01-01 01:01:01' as datetime) and diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 8d38b71ca4d..169c017c914 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -544,7 +544,7 @@ static ulonglong get_date_from_str(THD *thd, String *str, timestamp_type warn_type, char *warn_name, bool *error_arg) { - ulonglong value; + ulonglong value= 0; int error; MYSQL_TIME l_time; enum_mysql_timestamp_type ret; @@ -748,7 +748,7 @@ static ulonglong get_datetime_value(THD *thd, Item ***item_arg, Item **cache_arg, Item *warn_item, bool *is_null) { - ulonglong value; + ulonglong value= 0; String buf, *str= 0; Item *item= **item_arg; diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index dffd7517e78..3f0c24aa28a 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -8785,7 +8785,9 @@ static void test_ts() int rc, field_count; char name; char query[MAX_TEST_QUERY_LENGTH]; - + const char *queries [3]= {"SELECT a, b, c FROM test_ts WHERE %c=?", + "SELECT a, b, c FROM test_ts WHERE %c=?", + "SELECT a, b, c FROM test_ts WHERE %c=CAST(? AS DATE)"}; myheader("test_ts"); rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_ts"); @@ -8852,9 +8854,7 @@ static void test_ts() mysql_free_result(prep_res); mysql_stmt_close(stmt); - char queries [3][60]= {"SELECT a, b, c FROM test_ts WHERE %c=?", - "SELECT a, b, c FROM test_ts WHERE %c=?", - "SELECT a, b, c FROM test_ts WHERE %c=CAST(? AS DATE)"}; + for (name= 'a'; field_count--; name++) { int row_count= 0; |