[MDEV-15382] View with SELECT with LIKE and BETWEEN is created with invalid structure Created: 2018-02-21  Updated: 2018-08-15

Status: Open
Project: MariaDB Server
Component/s: Views
Affects Version/s: 10.2
Fix Version/s: 10.2

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


 Description   

CREATE OR REPLACE VIEW v AS SELECT ('foo' LIKE 'bar') BETWEEN 0 AND 1;
SELECT * FROM v;
 
# Cleanup
DROP VIEW v;

10.2 27ea2963fc

mysqltest: At line 2: query 'SELECT * FROM v' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'between 0 and 1 AS `('foo' LIKE 'bar') BETWEEN 0 AND 1`' at line 1

Also reproducible on 10.3.
Not reproducible on 5.5-10.1, MySQL 5.6, 5.7.


Generated at Thu Feb 08 08:20:52 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.