diff options
author | Michael Widenius <monty@askmonty.org> | 2011-05-28 05:11:32 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-05-28 05:11:32 +0300 |
commit | f197991f4102ed8ac66b7b57071f24f1d3b86aea (patch) | |
tree | b4590b80e7d50b664d8e6ff6a62978cb2402f0a6 /mysql-test/r/dyncol.result | |
parent | de44b51e151a00a00d0e396dc57ced3682d24d78 (diff) | |
parent | 306ed65302e14f303fdc33cfa9d19016fb319440 (diff) | |
download | mariadb-git-f197991f4102ed8ac66b7b57071f24f1d3b86aea.tar.gz |
Merge with 5.1-microseconds
A lot of small fixes and new test cases.
client/mysqlbinlog.cc:
Cast removed
client/mysqltest.cc:
Added missing DBUG_RETURN
include/my_pthread.h:
set_timespec_time_nsec() now only takes one argument
mysql-test/t/date_formats.test:
Remove --disable_ps_protocl as now also ps supports microseconds
mysys/my_uuid.c:
Changed to use my_interval_timer() instead of my_getsystime()
mysys/waiting_threads.c:
Changed to use my_hrtime()
sql/field.h:
Added bool special_const_compare() for fields that may convert values before compare (like year)
sql/field_conv.cc:
Added test to get optimal copying of identical temporal values.
sql/item.cc:
Return that item_int is equal if it's positive, even if unsigned flag is different.
Fixed Item_cache_str::save_in_field() to have identical null check as other similar functions
Added proper NULL check to Item_cache_int::save_in_field()
sql/item_cmpfunc.cc:
Don't call convert_constant_item() if there is nothing that is worth converting.
Simplified test when years should be converted
sql/item_sum.cc:
Mark cache values in Item_sum_hybrid as not constants to ensure they are not replaced by other cache values in compare_datetime()
sql/item_timefunc.cc:
Changed sec_to_time() to take a my_decimal argument to ensure we don't loose any sub seconds.
Added Item_temporal_func::get_time() (This simplifies some things)
sql/mysql_priv.h:
Added Lazy_string_decimal()
sql/mysqld.cc:
Added my_decimal constants max_seconds_for_time_type, time_second_part_factor
sql/table.cc:
Changed expr_arena to be of type CONVENTIONAL_EXECUTION to ensure that we don't loose any items that are created by fix_fields()
sql/tztime.cc:
TIME_to_gmt_sec() now sets *in_dst_time_gap in case of errors
This is needed to be able to detect if timestamp is 0
storage/maria/lockman.c:
Changed from my_getsystime() to set_timespec_time_nsec()
storage/maria/ma_loghandler.c:
Changed from my_getsystime() to my_hrtime()
storage/maria/ma_recovery.c:
Changed from my_getsystime() to mmicrosecond_interval_timer()
storage/maria/unittest/trnman-t.c:
Changed from my_getsystime() to mmicrosecond_interval_timer()
storage/xtradb/handler/ha_innodb.cc:
Added support for new time,datetime and timestamp
unittest/mysys/thr_template.c:
my_getsystime() -> my_interval_timer()
unittest/mysys/waiting_threads-t.c:
my_getsystime() -> my_interval_timer()
Diffstat (limited to 'mysql-test/r/dyncol.result')
-rw-r--r-- | mysql-test/r/dyncol.result | 113 |
1 files changed, 81 insertions, 32 deletions
diff --git a/mysql-test/r/dyncol.result b/mysql-test/r/dyncol.result index 95750d02cda..ec1d623f3df 100644 --- a/mysql-test/r/dyncol.result +++ b/mysql-test/r/dyncol.result @@ -292,8 +292,11 @@ column_get(column_create(1, "2011-04-05" AS date), 1 as int) select column_get(column_create(1, "8:46:06.23434" AS time), 1 as int); column_get(column_create(1, "8:46:06.23434" AS time), 1 as int) 84606 -select column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as int); -column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as int) +select column_get(column_create(1, "8:46:06.23434" AS time(6)), 1 as int); +column_get(column_create(1, "8:46:06.23434" AS time(6)), 1 as int) +84606 +select column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime(6)), 1 as int); +column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime(6)), 1 as int) 20110405084606 select column_get(column_create(1, NULL AS int), 1 as int); column_get(column_create(1, NULL AS int), 1 as int) @@ -393,9 +396,21 @@ column_get(column_create(1, "2011-04-05" AS date), 1 as char charset utf8) select column_get(column_create(1, "8:46:06.23434" AS time), 1 as char charset utf8); column_get(column_create(1, "8:46:06.23434" AS time), 1 as char charset utf8) 08:46:06.234340 +select column_get(column_create(1, "8:46:06.23434" AS time(0)), 1 as char charset utf8); +column_get(column_create(1, "8:46:06.23434" AS time(0)), 1 as char charset utf8) +08:46:06.234340 +select column_get(column_create(1, "8:46:06.23434" AS time(6)), 1 as char charset utf8); +column_get(column_create(1, "8:46:06.23434" AS time(6)), 1 as char charset utf8) +08:46:06.234340 select column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as char charset utf8); column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as char charset utf8) 2011-04-05 08:46:06.234340 +select column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime(0)), 1 as char charset utf8); +column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime(0)), 1 as char charset utf8) +2011-04-05 08:46:06.234340 +select column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime(6)), 1 as char charset utf8); +column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime(6)), 1 as char charset utf8) +2011-04-05 08:46:06.234340 select column_get(column_create(1, NULL AS char charset utf8), 1 as char charset utf8); column_get(column_create(1, NULL AS char charset utf8), 1 as char charset utf8) NULL @@ -447,9 +462,15 @@ column_get(column_create(1, "2011-04-05" AS date), 1 as double) select column_get(column_create(1, "8:46:06.23434" AS time), 1 as double); column_get(column_create(1, "8:46:06.23434" AS time), 1 as double) 84606.23434 +select column_get(column_create(1, "8:46:06.23434" AS time(6)), 1 as double); +column_get(column_create(1, "8:46:06.23434" AS time(6)), 1 as double) +84606.23434 select column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as double); column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as double) 20110405084606.2 +select column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime(6)), 1 as double); +column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime(6)), 1 as double) +20110405084606.2 select round(column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as double(20,6)),3); round(column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as double(20,6)),3) 20110405084606.234 @@ -516,9 +537,20 @@ column_get(column_create(1, "2011-04-05" AS date), 1 as decimal(32,6)) select column_get(column_create(1, "8:46:06.23434" AS time), 1 as decimal(32,6)); column_get(column_create(1, "8:46:06.23434" AS time), 1 as decimal(32,6)) 84606.234340 -select column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as decimal(32,6)); -column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as decimal(32,6)) -20110405084606.230000 +select column_get(column_create(1, "8:46:06.23434" AS time(6)), 1 as decimal(32,6)); +column_get(column_create(1, "8:46:06.23434" AS time(6)), 1 as decimal(32,6)) +84606.234340 +select column_get(column_create(1, "2011-04-05 8:46:06.123456" AS datetime), 1 as decimal(32,6)); +column_get(column_create(1, "2011-04-05 8:46:06.123456" AS datetime), 1 as decimal(32,6)) +20110405084606.123456 +select column_get(column_create(1, "2011-04-05 8:46:06.123456" AS datetime(6)), 1 as decimal(32,6)); +column_get(column_create(1, "2011-04-05 8:46:06.123456" AS datetime(6)), 1 as decimal(32,6)) +20110405084606.123456 +select column_get(column_create(1, "2011-04-05 8:46:06.12345678" AS datetime(6)), 1 as decimal(32,8)); +column_get(column_create(1, "2011-04-05 8:46:06.12345678" AS datetime(6)), 1 as decimal(32,8)) +20110405084606.12345600 +Warnings: +Warning 1292 Truncated incorrect datetime value: '2011-04-05 8:46:06.12345678' select column_get(column_create(1, NULL as decimal), 1 as decimal(32,10)); column_get(column_create(1, NULL as decimal), 1 as decimal(32,10)) NULL @@ -589,10 +621,10 @@ column_get(column_create(1, 0.0 AS decimal,2, 0.0 as decimal), 1 as decimal) # select column_get(column_create(1, 20010203101112.121314 as double), 1 as datetime); column_get(column_create(1, 20010203101112.121314 as double), 1 as datetime) -2001-02-03 10:11:12.125000 +2001-02-03 10:11:12 select column_get(column_create(1, 20010203101112.121314 as decimal), 1 as datetime); column_get(column_create(1, 20010203101112.121314 as decimal), 1 as datetime) -2001-02-03 10:11:12.121314 +2001-02-03 10:11:12 select column_get(column_create(1, 20010203101112 as unsigned int), 1 as datetime); column_get(column_create(1, 20010203101112 as unsigned int), 1 as datetime) 2001-02-03 10:11:12 @@ -607,19 +639,25 @@ column_get(column_create(1, "2001-02-03 10:11:12" as char), 1 as datetime) 2001-02-03 10:11:12 select column_get(column_create(1, "2001-02-03 10:11:12.121314" as char), 1 as datetime); column_get(column_create(1, "2001-02-03 10:11:12.121314" as char), 1 as datetime) -2001-02-03 10:11:12.121314 +2001-02-03 10:11:12 select column_get(column_create(1, "2001-02-03 10:11:12.121314"), 1 as datetime); column_get(column_create(1, "2001-02-03 10:11:12.121314"), 1 as datetime) -2001-02-03 10:11:12.121314 +2001-02-03 10:11:12 select column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as datetime); column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as datetime) +2011-04-05 08:46:06 +select column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as datetime(0)); +column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as datetime(0)) +2011-04-05 08:46:06 +select column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as datetime(6)); +column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as datetime(6)) 2011-04-05 08:46:06.234340 select column_get(column_create(1, "2011-00-00 8:46:06.23434" AS CHAR), 1 as datetime); column_get(column_create(1, "2011-00-00 8:46:06.23434" AS CHAR), 1 as datetime) -2011-00-00 08:46:06.234340 +2011-00-00 08:46:06 select column_get(column_create(1, "2011-00-01 8:46:06.23434" AS CHAR), 1 as datetime); column_get(column_create(1, "2011-00-01 8:46:06.23434" AS CHAR), 1 as datetime) -2011-00-01 08:46:06.234340 +2011-00-01 08:46:06 select column_get(column_create(1, 20010203 as unsigned int), 1 as datetime); column_get(column_create(1, 20010203 as unsigned int), 1 as datetime) 2001-02-03 00:00:00 @@ -649,11 +687,11 @@ column_get(column_create(1, "2001021"), 1 as datetime) 2020-01-02 01:00:00 select column_get(column_create(1, "8:46:06.23434" AS time), 1 as datetime); column_get(column_create(1, "8:46:06.23434" AS time), 1 as datetime) -0000-00-00 08:46:06.234340 +0000-00-00 08:46:06 set @@sql_mode="allow_invalid_dates"; select column_get(column_create(1, "2011-02-30 18:46:06.23434" AS CHAR), 1 as datetime); column_get(column_create(1, "2011-02-30 18:46:06.23434" AS CHAR), 1 as datetime) -2011-02-30 18:46:06.234340 +2011-02-30 18:46:06 select column_get(column_create(1, "0000-00-000" AS CHAR), 1 as datetime); column_get(column_create(1, "0000-00-000" AS CHAR), 1 as datetime) 0000-00-00 00:00:00 @@ -852,10 +890,10 @@ Warning 1292 Incorrect datetime value: '0' # select column_get(column_create(1, 20010203101112.121314 as double), 1 as time); column_get(column_create(1, 20010203101112.121314 as double), 1 as time) -10:11:12.100000 +10:11:12 select column_get(column_create(1, 20010203101112.121314 as decimal), 1 as time); column_get(column_create(1, 20010203101112.121314 as decimal), 1 as time) -10:11:12.121314 +10:11:12 select column_get(column_create(1, 20010203101112 as unsigned int), 1 as time); column_get(column_create(1, 20010203101112 as unsigned int), 1 as time) 10:11:12 @@ -870,33 +908,39 @@ column_get(column_create(1, "2001-02-03 10:11:12" as char), 1 as time) 10:11:12 select column_get(column_create(1, "2001-02-03 10:11:12.121314" as char), 1 as time); column_get(column_create(1, "2001-02-03 10:11:12.121314" as char), 1 as time) +10:11:12 +select column_get(column_create(1, "2001-02-03 10:11:12.121314" as char), 1 as time(6)); +column_get(column_create(1, "2001-02-03 10:11:12.121314" as char), 1 as time(6)) 10:11:12.121314 select column_get(column_create(1, "2001-02-03 10:11:12.121314"), 1 as time); column_get(column_create(1, "2001-02-03 10:11:12.121314"), 1 as time) -10:11:12.121314 -select column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as time); -column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as time) +10:11:12 +select column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as time(6)); +column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as time(6)) 08:46:06.234340 -select column_get(column_create(1, "2011-00-00 8:46:06.23434" AS CHAR), 1 as time); -column_get(column_create(1, "2011-00-00 8:46:06.23434" AS CHAR), 1 as time) +select column_get(column_create(1, "2011-00-00 8:46:06.23434" AS CHAR), 1 as time(6)); +column_get(column_create(1, "2011-00-00 8:46:06.23434" AS CHAR), 1 as time(6)) 08:46:06.234340 -select column_get(column_create(1, "2011-00-01 8:46:06.23434" AS CHAR), 1 as time); -column_get(column_create(1, "2011-00-01 8:46:06.23434" AS CHAR), 1 as time) +select column_get(column_create(1, "2011-00-01 8:46:06.23434" AS CHAR), 1 as time(6)); +column_get(column_create(1, "2011-00-01 8:46:06.23434" AS CHAR), 1 as time(6)) 08:46:06.234340 -select column_get(column_create(1, "830:46:06.23434" AS CHAR), 1 as time); -column_get(column_create(1, "830:46:06.23434" AS CHAR), 1 as time) +select column_get(column_create(1, "830:46:06.23434" AS CHAR), 1 as time(6)); +column_get(column_create(1, "830:46:06.23434" AS CHAR), 1 as time(6)) 830:46:06.234340 -select cast("-830:46:06.23434" AS time); -cast("-830:46:06.23434" AS time) +select column_get(column_create(1, "830:46:06" AS CHAR), 1 as time(6)); +column_get(column_create(1, "830:46:06" AS CHAR), 1 as time(6)) +830:46:06.000000 +select cast("-830:46:06.23434" AS time(6)); +cast("-830:46:06.23434" AS time(6)) -830:46:06.234340 -select 1,cast("-830:46:06.23434" AS time); -1 cast("-830:46:06.23434" AS time) +select 1,cast("-830:46:06.23434" AS time(6)); +1 cast("-830:46:06.23434" AS time(6)) 1 -830:46:06.234340 select hex(column_create(1, "-830:46:06.23434" AS CHAR)); hex(column_create(1, "-830:46:06.23434" AS CHAR)) 000100010003082D3833303A34363A30362E3233343334 -select column_get(column_create(1, "-830:46:06.23434" AS CHAR), 1 as time); -column_get(column_create(1, "-830:46:06.23434" AS CHAR), 1 as time) +select column_get(column_create(1, "-830:46:06.23434" AS CHAR), 1 as time(6)); +column_get(column_create(1, "-830:46:06.23434" AS CHAR), 1 as time(6)) -830:46:06.234340 select column_get(column_create(1, "0" AS CHAR), 1 as time); column_get(column_create(1, "0" AS CHAR), 1 as time) @@ -919,12 +963,17 @@ column_get(column_create(1, "2001021"), 1 as time) set @@sql_mode="allow_invalid_dates"; select column_get(column_create(1, "2011-02-30 18:46:06.23434" AS CHAR), 1 as time); column_get(column_create(1, "2011-02-30 18:46:06.23434" AS CHAR), 1 as time) -18:46:06.234340 +18:46:06 set @@sql_mode=""; # column get date truncation & warnings select column_get(column_create(1, "1223.5aa" AS char), 1 as time); column_get(column_create(1, "1223.5aa" AS char), 1 as time) -00:12:23.500000 +00:12:23 +Warnings: +Warning 1292 Truncated incorrect time value: '1223.5aa' +select column_get(column_create(1, "1223.5aa" AS char), 1 as time(3)); +column_get(column_create(1, "1223.5aa" AS char), 1 as time(3)) +00:12:23.500 Warnings: Warning 1292 Truncated incorrect time value: '1223.5aa' select column_get(column_create(1, 18446744073709551615 AS unsigned int), 1 as time); |