mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug#46923: select count(*) from partitioned table fails with
ONLY_FULL_GROUP_BY Problem was that during checking and preparation of the partitioining function as a side effect in fix_fields the full_group_by_flag was changed. Solution was to set it back to its original value after calling fix_fields. Updated patch, to also exclude allow_sum_func from being affected of fix_fields, as requested by reviewer. mysql-test/r/partition.result: Bug#46923: select count(*) from partitioned table fails with ONLY_FULL_GROUP_BY Updated result file mysql-test/t/partition.test: Bug#46923: select count(*) from partitioned table fails with ONLY_FULL_GROUP_BY Extended test case to cover this bug sql/sql_partition.cc: Bug#46923: select count(*) from partitioned table fails with ONLY_FULL_GROUP_BY Resetting full_group_by_flag and allow_sum_func back to their original values, not conflicting with the sql_mode 'ONLY_FULL_GROUP_BY'
This commit is contained in:
@ -2030,10 +2030,15 @@ DROP TABLE t1;
|
||||
#
|
||||
# Bug #45807: crash accessing partitioned table and sql_mode
|
||||
# contains ONLY_FULL_GROUP_BY
|
||||
# Bug#46923: select count(*) from partitioned table fails with
|
||||
# ONLY_FULL_GROUP_BY
|
||||
#
|
||||
SET SESSION SQL_MODE='ONLY_FULL_GROUP_BY';
|
||||
CREATE TABLE t1(id INT,KEY(id)) ENGINE=MYISAM
|
||||
PARTITION BY HASH(id) PARTITIONS 2;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
DROP TABLE t1;
|
||||
SET SESSION SQL_MODE=DEFAULT;
|
||||
#
|
||||
|
Reference in New Issue
Block a user