diff options
author | unknown <igor@rurik.mysql.com> | 2006-06-09 17:56:08 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2006-06-09 17:56:08 -0700 |
commit | ddd55d4349cef4002d8724eac7f2735538d55d02 (patch) | |
tree | a35d4a02dd33f64c0522f3313f41b5814ac15fbf | |
parent | 8e418820e9f6e82691a3b489a951e78af4feaba2 (diff) | |
parent | 5efb70d7771c905b61e5e01e2f0643a5953adb83 (diff) | |
download | mariadb-git-ddd55d4349cef4002d8724eac7f2735538d55d02.tar.gz |
Merge rurik.mysql.com:/home/igor/tmp_merge
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0
VC++Files/client/mysql.dsp:
Auto merged
mysql-test/t/func_time.test:
Auto merged
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
Auto merged
ndb/src/ndbapi/NdbDictionaryImpl.hpp:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/item_timefunc.h:
Auto merged
client/mysqldump.c:
Manual merge
mysql-test/r/func_time.result:
Manual merge
-rw-r--r-- | VC++Files/client/mysql.dsp | 4 | ||||
-rw-r--r-- | VC++Files/client/mysql_ia64.dsp | 4 | ||||
-rw-r--r-- | mysql-test/r/func_time.result | 12 | ||||
-rw-r--r-- | mysql-test/t/func_time.test | 7 | ||||
-rw-r--r-- | ndb/src/ndbapi/NdbDictionaryImpl.cpp | 2 | ||||
-rw-r--r-- | ndb/src/ndbapi/NdbDictionaryImpl.hpp | 1 | ||||
-rw-r--r-- | sql/item_timefunc.cc | 6 | ||||
-rw-r--r-- | sql/item_timefunc.h | 1 |
8 files changed, 28 insertions, 9 deletions
diff --git a/VC++Files/client/mysql.dsp b/VC++Files/client/mysql.dsp index ac74515b588..510107c8308 100644 --- a/VC++Files/client/mysql.dsp +++ b/VC++Files/client/mysql.dsp @@ -144,6 +144,10 @@ SOURCE=.\readline.cpp # End Source File # Begin Source File +SOURCE=..\mysys\my_conio.c +# End Source File +# Begin Source File + SOURCE=.\sql_string.cpp # End Source File # End Target diff --git a/VC++Files/client/mysql_ia64.dsp b/VC++Files/client/mysql_ia64.dsp index 3fe2e2a2328..8de283d1e0b 100644 --- a/VC++Files/client/mysql_ia64.dsp +++ b/VC++Files/client/mysql_ia64.dsp @@ -130,6 +130,10 @@ SOURCE=.\readline.cpp # End Source File # Begin Source File +SOURCE=..\mysys\my_conio.c +# End Source File +# Begin Source File + SOURCE=.\sql_string.cpp # End Source File # End Target diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 0e029802555..bc1bd3b6757 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -7,20 +7,20 @@ period_add("9602",-12) period_diff(199505,"9404") 199502 13 select now()-now(),weekday(curdate())-weekday(now()),unix_timestamp()-unix_timestamp(now()); now()-now() weekday(curdate())-weekday(now()) unix_timestamp()-unix_timestamp(now()) -0 0 0 +0.000000 0 0 select from_unixtime(unix_timestamp("1994-03-02 10:11:12")),from_unixtime(unix_timestamp("1994-03-02 10:11:12"),"%Y-%m-%d %h:%i:%s"),from_unixtime(unix_timestamp("1994-03-02 10:11:12"))+0; from_unixtime(unix_timestamp("1994-03-02 10:11:12")) from_unixtime(unix_timestamp("1994-03-02 10:11:12"),"%Y-%m-%d %h:%i:%s") from_unixtime(unix_timestamp("1994-03-02 10:11:12"))+0 -1994-03-02 10:11:12 1994-03-02 10:11:12 19940302101112 +1994-03-02 10:11:12 1994-03-02 10:11:12 19940302101112.000000 select sec_to_time(9001),sec_to_time(9001)+0,time_to_sec("15:12:22"), sec_to_time(time_to_sec("0:30:47")/6.21); sec_to_time(9001) sec_to_time(9001)+0 time_to_sec("15:12:22") sec_to_time(time_to_sec("0:30:47")/6.21) -02:30:01 23001 54742 00:04:57 +02:30:01 23001.000000 54742 00:04:57 select sec_to_time(time_to_sec('-838:59:59')); sec_to_time(time_to_sec('-838:59:59')) -838:59:59 select now()-curdate()*1000000-curtime(); now()-curdate()*1000000-curtime() -0 +0.000000 select strcmp(current_timestamp(),concat(current_date()," ",current_time())); strcmp(current_timestamp(),concat(current_date()," ",current_time())) 0 @@ -751,6 +751,10 @@ select monthname(str_to_date(null, '%m')), monthname(str_to_date(null, '%m')), monthname(str_to_date(1, '%m')), monthname(str_to_date(0, '%m')); monthname(str_to_date(null, '%m')) monthname(str_to_date(null, '%m')) monthname(str_to_date(1, '%m')) monthname(str_to_date(0, '%m')) NULL NULL January NULL +select now() - now() + 0, curtime() - curtime() + 0, +sec_to_time(1) + 0, from_unixtime(1) + 0; +now() - now() + 0 curtime() - curtime() + 0 sec_to_time(1) + 0 from_unixtime(1) + 0 +0.000000 0.000000 1.000000 19700101030001.000000 explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a1, timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:58:58.119999') as a2; id select_type table type possible_keys key key_len ref rows Extra diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index 1c7f387e354..dc2e74c9365 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -367,6 +367,13 @@ select last_day('2005-01-00'); select monthname(str_to_date(null, '%m')), monthname(str_to_date(null, '%m')), monthname(str_to_date(1, '%m')), monthname(str_to_date(0, '%m')); +# +# Bug #16546 +# + +select now() - now() + 0, curtime() - curtime() + 0, + sec_to_time(1) + 0, from_unixtime(1) + 0; + # End of 4.1 tests explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a1, diff --git a/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/ndb/src/ndbapi/NdbDictionaryImpl.cpp index a3e2e69ce14..bd50440b3c0 100644 --- a/ndb/src/ndbapi/NdbDictionaryImpl.cpp +++ b/ndb/src/ndbapi/NdbDictionaryImpl.cpp @@ -2267,7 +2267,7 @@ NdbDictionaryImpl::dropIndex(const char * indexName, m_error.code = 4243; return -1; } - int ret = dropIndex(*idx); //, tableName); + int ret = dropIndex(*idx); // If index stored in cache is incompatible with the one in the kernel // we must clear the cache and try again if (ret == INCOMPATIBLE_VERSION) { diff --git a/ndb/src/ndbapi/NdbDictionaryImpl.hpp b/ndb/src/ndbapi/NdbDictionaryImpl.hpp index b0b7adf25f3..bc9894497f8 100644 --- a/ndb/src/ndbapi/NdbDictionaryImpl.hpp +++ b/ndb/src/ndbapi/NdbDictionaryImpl.hpp @@ -395,7 +395,6 @@ public: int createIndex(NdbIndexImpl &ix); int dropIndex(const char * indexName, const char * tableName); - // int dropIndex(NdbIndexImpl &, const char * tableName); int dropIndex(NdbIndexImpl &); NdbTableImpl * getIndexTable(NdbIndexImpl * index, NdbTableImpl * table); diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index ca7028dae1e..4195db4a6ee 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -1391,7 +1391,7 @@ void Item_func_curtime::fix_length_and_dec() { TIME ltime; - decimals=0; + decimals= DATETIME_DEC; collation.set(&my_charset_bin); store_now_in_TIME(<ime); value= TIME_to_ulonglong_time(<ime); @@ -1438,7 +1438,7 @@ String *Item_func_now::val_str(String *str) void Item_func_now::fix_length_and_dec() { - decimals=0; + decimals= DATETIME_DEC; collation.set(&my_charset_bin); store_now_in_TIME(<ime); @@ -1785,7 +1785,7 @@ void Item_func_from_unixtime::fix_length_and_dec() { thd= current_thd; collation.set(&my_charset_bin); - decimals=0; + decimals= DATETIME_DEC; max_length=MAX_DATETIME_WIDTH*MY_CHARSET_BIN_MB_MAXLEN; maybe_null= 1; thd->time_zone_used= 1; diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index b2f0dab0837..9a14b961130 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -614,6 +614,7 @@ public: { collation.set(&my_charset_bin); maybe_null=1; + decimals= DATETIME_DEC; max_length=MAX_TIME_WIDTH*MY_CHARSET_BIN_MB_MAXLEN; } enum_field_types field_type() const { return MYSQL_TYPE_TIME; } |