Sergey Korotkov created IGNITE-24514:
----------------------------------------

             Summary: Invalid SQL query prevent table drop and causes node 
crash on table recreate
                 Key: IGNITE-24514
                 URL: https://issues.apache.org/jira/browse/IGNITE-24514
             Project: Ignite
          Issue Type: Bug
            Reporter: Sergey Korotkov
            Assignee: Sergey Korotkov


Invalid SQL query with the WITH clause (AKA Common Table Expressions - CTEs) 
can leave the H2 sql query engine in the state that the following bad things 
can happen:

- Table can not be dropped correctly. Call to {{ignite.destroyCache}} or "DROP 
TABLE" SQL  succseed. Ignite cache is removed but not the table.
- Table can not be recreated (it fails saying table already exists)
- If table has index and created via the Ignite API and {{QueryEntity}}'s  the 
ignite node crashes with AsserionError.
 

Sample query:
{code:sql}
WITH cte AS (SELECT id FROM T2) 
SELECT * FROM absent_table_to_emulate_statement_parse_failure
{code}

After such a query the drop table fails leaving the foolowing WARN in the node 
logs: 





--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to