[MDEV-7779] View definition changes upon creation Created: 2015-03-14  Updated: 2015-04-28  Resolved: 2015-04-28

Status: Closed
Project: MariaDB Server
Component/s: GIS, Views
Affects Version/s: 5.5, 10.0, 10.1
Fix Version/s: 5.5.43

Type: Bug Priority: Major
Reporter: John Donofrio Assignee: Alexey Botchkov
Resolution: Fixed Votes: 0
Labels: verified
Environment:

Debian 7.8, Mariadb 10.0.17


Attachments: File test_create_view.sql     File test_query.sql     File test_setup.sql    
Issue Links:
Relates
relates to MDEV-7512 GIS: ST_ synonyms for functions are n... Closed

 Description   

When creating a view using the following join:

...on(mbrcontains(`a`.`b`,geometryfromwkb(point(`y`.`z`,0))))

it changes to:

...on(mbrcontains(`a`.`b`,st_geometryfromwkb(st_point(`y`.`z`,0))))

which will not work since st_point is not a valid function.

When a query is executed with the same SQL as the view definition, it works as expected.

Three files are attached for duplicating the issue:

  • test_setup.sql - Setup the test DB with tables, views and sample data
  • test_query.sql - execute a query with the same SQL as the view in question
  • test_create_view.sql - Create a view which is modified upon save as described above.


 Comments   
Comment by Elena Stepanova [ 2015-03-14 ]

Thanks for the report and test case.

Comment by Alexey Botchkov [ 2015-04-28 ]

Fixing patch:
http://lists.askmonty.org/pipermail/commits/2015-April/007794.html

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