diff options
author | unknown <monty@mysql.com> | 2004-06-21 10:21:20 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-06-21 10:21:20 +0300 |
commit | 0c0b2bae9059600def579ac9cce0ad02cc416c0c (patch) | |
tree | a55d40c04126c696aec19a9bdd340a11258e07e6 /sql/field.cc | |
parent | c18d847386c7fd050cfca341b466bf9ac24aa2b2 (diff) | |
download | mariadb-git-0c0b2bae9059600def579ac9cce0ad02cc416c0c.tar.gz |
After merge fixes
Return NULL if a time argument is given to date_add(). (Warning will be shown after Dimitri's timezone patch is pushed)
client/mysqltest.c:
Added MAX_VAR_NAME which was lost in merge
Added more debugging
Fixed bug in 'eval'
innobase/data/data0type.c:
After merge fix
innobase/fil/fil0fil.c:
After merge fix
innobase/log/log0recv.c:
After merge fix
myisam/mi_unique.c:
Better checksum handling
mysql-test/r/func_time.result:
Return NULL if a time argument is given to date_add()
mysql-test/r/rpl_free_items.result:
After merge fix
mysql-test/r/rpl_get_lock.result:
Test was depending on when server was restarted.
mysql-test/r/type_date.result:
After merge fix
mysql-test/r/type_decimal.result:
After merge fix
mysql-test/t/func_time.test:
Removed comment that is not needed anymore
(After Dimitri's timezone patch is pushed, we should get a warning for the date_add(time...) entry)
mysql-test/t/rpl_get_lock.test:
Test was depending on when server was restarted.
mysql-test/t/type_date.test:
Addded missing explanation for bug
netware/mysqld_safe.c:
Removed end \r
Run program through indent-ex to get MySQL indentation
sql-common/client.c:
After merge fix
sql/field.cc:
Fixed that get_date(time) gives a warning
sql/field.h:
After merge fix
sql/net_serv.cc:
More debugging (if DEBUG_DATA_PACKETS is set)
sql/sql_class.cc:
Removed compiler warning
sql/table.cc:
Better comment
Diffstat (limited to 'sql/field.cc')
-rw-r--r-- | sql/field.cc | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/sql/field.cc b/sql/field.cc index 2077a6e5455..bc76d05a05b 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -3395,10 +3395,21 @@ String *Field_time::val_str(String *val_buffer, } -bool Field_time::get_date(TIME *ltime, - bool fuzzydate __attribute__((unused))) +/* + Normally we would not consider 'time' as a vaild date, but we allow + get_date() here to be able to do things like + DATE_FORMAT(time, "%l.%i %p") +*/ + +bool Field_time::get_date(TIME *ltime, uint fuzzydate) { - long tmp=(long) sint3korr(ptr); + long tmp; + if (!fuzzydate) + { + set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE); + return 1; + } + tmp=(long) sint3korr(ptr); ltime->neg=0; if (tmp < 0) { |