← Back to team overview

maria-developers team mailing list archive

Re: [Commits] Rev 3711: MDEV-5104 crash in Item_field::used_tables with broken order by in file:///home/tsk/mprog/src/5.3/

 

Hi!

OK to push! Thank you!

29.10.2013 12:39, timour@xxxxxxxxxxxx пишет:
At file:///home/tsk/mprog/src/5.3/

------------------------------------------------------------
revno: 3711
revision-id: timour@xxxxxxxxxxxx-20131029103903-bvjnf3b2aqnoyut5
parent: sanja@xxxxxxxxxxxx-20131021104549-857lwynmy813qyd4
fixes bug: https://mariadb.atlassian.net/browse/MDEV-5104
committer: timour@xxxxxxxxxxxx <timour@xxxxxxxxxxxx>
branch nick: 5.3
timestamp: Tue 2013-10-29 12:39:03 +0200
message:
   MDEV-5104 crash in Item_field::used_tables with broken order by
Analysis:
   st_select_lex_unit::prepare() computes can_skip_order_by as TRUE.
   As a result join->prepare() gets called with order == NULL, and
   doesn't do name resolution for the inner ORDER clause. Due to this
   the prepare phase doesn't detect that the query references non-exiting
   function and field.
Later join->optimize() calls update_used_tables() for a non-resolved
   Item_field, which understandably has no Field object. This call results
   in a crash.
Solution:
   Resolve unnecessary ORDER BY clauses to detect if they reference non-exising
   objects. Then remove such clauses from the JOIN object.


_______________________________________________
commits mailing list
commits@xxxxxxxxxxx
https://lists.askmonty.org/cgi-bin/mailman/listinfo/commits