diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-03-08 19:41:58 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-03-08 19:41:58 +0100 |
commit | 8b7fd8f577fe3edc84eea54288c7d30775a1559b (patch) | |
tree | 6d245df86f99894d74eea055dc01800ccc2d7bb4 /mysql-test/r/func_sapdb.result | |
parent | 2c80662d231414eb98b5cd4cede069d1482ccc20 (diff) | |
download | mariadb-git-8b7fd8f577fe3edc84eea54288c7d30775a1559b.tar.gz |
lp:731124 Loss of precision on DISTINCT
many changes:
* NOT_FIXED_DEC now create hires fields, not old ones.
As a result, temp tables preserve microseconds (on DISTINCT, GROUP BY)
* I_S tables force decimals=0 on temporal types (backward compatibility)
* Item_func_coalesce calculates decimals for temporal types
* no precision for TIME/DATETIME in CAST means 0, not NOT_FIXED_DEC
* addtime/timediff calculate decimals from arguments (not NOT_FIXED_DEC)
sql/field.h:
NOT_FIXED_DEC now create hires fields, not old ones
sql/item.h:
force decimals=0 for I_S tables
sql/item_cmpfunc.cc:
Item_func_coalesce calculates decimals for temporal types
sql/item_create.cc:
no precision for TIME/DATETIME in CAST means 0, not NOT_FIXED_DEC
sql/item_timefunc.cc:
addtime calculates decimals from arguments (not NOT_FIXED_DEC)
sql/item_timefunc.h:
timediff calculates decimals from arguments (not NOT_FIXED_DEC)
Diffstat (limited to 'mysql-test/r/func_sapdb.result')
-rw-r--r-- | mysql-test/r/func_sapdb.result | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/mysql-test/r/func_sapdb.result b/mysql-test/r/func_sapdb.result index c2d9a5c5ffa..f7a388237e8 100644 --- a/mysql-test/r/func_sapdb.result +++ b/mysql-test/r/func_sapdb.result @@ -195,17 +195,17 @@ time("1997-12-31 23:59:59.000001") as f9; describe t1; Field Type Null Key Default Extra f1 date YES NULL -f2 datetime YES NULL -f3 time YES NULL -f4 time YES NULL -f5 time YES NULL +f2 datetime(6) YES NULL +f3 time(6) YES NULL +f4 time(6) YES NULL +f5 time(6) YES NULL f6 time YES NULL -f7 datetime YES NULL +f7 datetime(6) YES NULL f8 date YES NULL -f9 time YES NULL +f9 time(6) YES NULL select * from t1; f1 f2 f3 f4 f5 f6 f7 f8 f9 -1997-01-01 1998-01-02 01:01:00 49:01:01 46:58:57 -24:00:00 10:11:12 2001-12-01 01:01:01 1997-12-31 23:59:59 +1997-01-01 1998-01-02 01:01:00.000003 49:01:01.000001 46:58:57.999999 8275:29:36.710655 10:11:12 2001-12-01 01:01:01.000000 1997-12-31 23:59:59.000001 create table test(t1 datetime, t2 time, t3 time, t4 datetime); insert into test values ('2001-01-01 01:01:01', '01:01:01', null, '2001-02-01 01:01:01'), @@ -230,8 +230,8 @@ SELECT TIMEDIFF(t1, t4) As ttt, TIMEDIFF(t2, t3) As qqq, TIMEDIFF(t3, t2) As eee, TIMEDIFF(t2, t4) As rrr from test; ttt qqq eee rrr -744:00:00 NULL NULL NULL -838:59:59.999999 22:58:58 -22:58:58 NULL --838:59:59.999999 -22:58:58 22:58:58 NULL +838:59:59 22:58:58 -22:58:58 NULL +-838:59:59 -22:58:58 22:58:58 NULL NULL 26:02:02 -26:02:02 NULL 00:00:00 -26:02:02 26:02:02 NULL NULL NULL NULL NULL |