diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-11-17 16:50:15 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-11-17 16:50:15 +0100 |
commit | 13ba0dd286f3296bfbbd202fa76d47770734b472 (patch) | |
tree | 5790c99069390098160a26ac5b05215f4179f818 /mysql-test/t/group_by.test | |
parent | ecf04668a2db3d7fc91e421e68eeb5ab25064aa0 (diff) | |
download | mariadb-git-13ba0dd286f3296bfbbd202fa76d47770734b472.tar.gz |
MDEV-736 LP:1004615 - Unexpected warnings "Encountered illegal value '' when converting to DECIMAL" on a query with aggregate functions and GROUP BY
fix: don't call field->val_decimal() if the field->is_null()
because the buffer at field->ptr might not hold a valid decimal value
sql/item_sum.cc:
do not call field->val_decimal() if the field->is_null()
storage/maria/ma_blockrec.c:
cleanup
storage/maria/ma_rrnd.c:
cleanup
strings/decimal.c:
typo
Diffstat (limited to 'mysql-test/t/group_by.test')
-rw-r--r-- | mysql-test/t/group_by.test | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test index d4214442709..b80c158aa92 100644 --- a/mysql-test/t/group_by.test +++ b/mysql-test/t/group_by.test @@ -1456,7 +1456,7 @@ drop table t1; --echo # End of 5.2 tests --echo # ---echo # BUG#872702: Crash in add_ref_to_table_cond() when grouping by a PK +--echo # lp:872702 Crash in add_ref_to_table_cond() when grouping by a PK --echo # CREATE TABLE t1 (a int, PRIMARY KEY (a)) ; INSERT INTO t1 VALUES (14),(15),(16),(17),(18),(19),(20); @@ -1472,4 +1472,18 @@ WHERE a = ( GROUP BY 1; DROP TABLE t1, t2; +# +# MDEV-736 LP:1004615 - Unexpected warnings "Encountered illegal value '' when converting to DECIMAL" on a query with aggregate functions and GROUP BY +# + +FLUSH STATUS; # this test case *must* use Aria temp tables + +CREATE TABLE t1 (f1 INT, f2 decimal(20,1), f3 blob); +INSERT INTO t1 values(11,NULL,'blob'),(11,NULL,'blob'); +SELECT f3, MIN(f2) FROM t1 GROUP BY f1 LIMIT 1; +DROP TABLE t1; + +--echo the value below *must* be 1 +show status like 'Created_tmp_disk_tables'; + --echo # End of 5.3 tests |