summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-08-30 09:05:27 +0200
committerSergei Golubchik <sergii@pisem.net>2012-08-30 09:05:27 +0200
commit0536c506ff7c3ed261abc3d02fb787bfdd228abb (patch)
treea90299c0d1d60b416d192100e85262c71d2068ab /mysql-test
parent2de4f09a75ad878753bb090a4c04291113d7a0c0 (diff)
downloadmariadb-git-0536c506ff7c3ed261abc3d02fb787bfdd228abb.tar.gz
MDEV-437 Microseconds: In time functions precision is calculated modulo 256
store the precision in uint, not uint8
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/func_time.result2
-rw-r--r--mysql-test/t/func_time.test2
2 files changed, 4 insertions, 0 deletions
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result
index b3e2a01e2e3..2df0c691083 100644
--- a/mysql-test/r/func_time.result
+++ b/mysql-test/r/func_time.result
@@ -1897,3 +1897,5 @@ cast(greatest(cast("0-0-0" as date), cast("10:20:05" as time)) as datetime(6))
select microsecond('12:00:00.123456'), microsecond('2009-12-31 23:59:59.000010');
microsecond('12:00:00.123456') microsecond('2009-12-31 23:59:59.000010')
123456 10
+select now(258);
+ERROR 42000: Too big precision 258 specified for 'now'. Maximum is 6.
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test
index 07e6473bfdf..c3d1d74ec50 100644
--- a/mysql-test/t/func_time.test
+++ b/mysql-test/t/func_time.test
@@ -1142,3 +1142,5 @@ select cast(greatest(cast("0-0-0" as date), cast("10:20:05" as time)) as datetim
select microsecond('12:00:00.123456'), microsecond('2009-12-31 23:59:59.000010');
+--error ER_TOO_BIG_PRECISION
+select now(258);