[MDEV-15300] main.cte_nonrecursive failed in --embedded (again) Created: 2018-02-13  Updated: 2018-02-14  Resolved: 2018-02-14

Status: Closed
Project: MariaDB Server
Component/s: Embedded Server, Optimizer - CTE
Affects Version/s: None
Fix Version/s: 10.3.5

Type: Bug Priority: Critical
Reporter: Sergei Golubchik Assignee: Igor Babaev
Resolution: Fixed Votes: 0
Labels: None


 Description   

cte_nonrecursive fails in 10.3 in embedded builds like

main.cte_nonrecursive                    w2 [ fail ]
        Test ended at 2018-02-09 19:58:17
 
CURRENT_TEST: main.cte_nonrecursive
mysqltest: At line 770: query '$q' failed: 1146: Table 'test.cte_i' doesn't exist

The reason is the commit 3afc962 that fixed the bug MDEV-13453. It added this

if (tl->with ||
    (tl->with= tl->select_lex->find_table_def_in_with_clauses(tl)))
  continue; 

to check_grant() function. Which is wrong, privilege checking functions cannot have side-effects (like setting tl->with above) because they are not executed in embedded builds.

For some reason, that I did not look into, this does not fail in 10.2, though.



 Comments   
Comment by Igor Babaev [ 2018-02-14 ]

The fix for this problem was pushed into 10.2
(see 8411a8ff6080f346582878131ba4bd92cce7510c).
It was not merged into 10.3.

Comment by Sergei Golubchik [ 2018-02-14 ]

Oops. Sorry.

I should've checked why it doesn't fail in 10.2

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