[MDEV-6609] SQL inside an anonymous block is executed with wrong SQL_MODE Created: 2014-08-19  Updated: 2014-10-10  Resolved: 2014-08-20

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: N/A
Fix Version/s: 10.1.1

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-5317 Compound statement / anonymous blocks Closed

 Description   

Note: It might be related to MDEV-6606 or even have the same root cause.

create table t1 (a int);
# Query OK, 0 rows affected (0.98 sec)
 
set sql_mode='';
# Query OK, 0 rows affected (0.00 sec)
 
select a from t1 having a > 1;
# Empty set (0.01 sec)
 
delimiter |
begin not atomic select a from t1 having a > 1; end |
# ERROR 1463 (42000): Non-grouping field 'a' is used in HAVING clause

bb-MDEV-5317
commit 6502f42f679e605fcdbd6c8b49d2813f553001b0
Author: Sergei Golubchik <serg@mariadb.org>
Date:   Mon Aug 18 14:28:48 2014 +0200


Generated at Thu Feb 08 07:13:12 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.