tidb-incubator / weir

Apache License 2.0
97 stars 40 forks source link

support set session system variables #28

Closed teckick closed 3 years ago

teckick commented 3 years ago

What problem does this PR solve?

6 support set session system variables

What is changed and how it works?

When client execute a SET statement, QueryCtx first parse the statement and check if it is a set session variable statement. Then the variables are stored in QueryCtx. When client execute a query SQL, QueryCtx forward the variables to backend connection, the connection first restore the SetStmt to a SET statement and execute, if execution is success, backend connection is used to execute query statement.

Check List

Tests