qc: Implement qc_get_function_info for qc_mysqlembedded

MXS-1070

Now both qc_mysqlembedded and qc_sqlite return the same stuff
for the same statement, and both include also operators in
addition to pure functions. Whether that is the right approach,
is still subject to debate.

However, if we want to make it possible to disable e.g. the
use of concat as in "select concat(a) from t", where a is a string,
to prevent the bypassing of the masking filter, then conceptually
it should be possible to prevent "select a+0 from t", where a is an
int, as well.
This commit is contained in:
Johan Wikman
2017-01-04 18:29:40 +02:00
parent 0d561df880
commit 482fbe6400
8 changed files with 368 additions and 31 deletions

View File

@ -41,4 +41,9 @@ SAVEPOINT sa_savepoint_1
RELEASE SAVEPOINT sa_savepoint_1
# warning: [qc_sqlite] Statement was neither parsed nor recognized from keywords
# (Sqlite3 error: SQL logic error or missing database, near "RELEASE": syntax error): "RELEASE SNAPSHOT s"
# (Sqlite3 error: SQL logic error or missing database, near "RELEASE": syntax error): "RELEASE SNAPSHOT s"
INSERT INTO t1 ( a ) SELECT 0 ON DUPLICATE KEY UPDATE a = a + VALUES (a);
# warning: [qc_sqlite] Statement was only partially parsed
# (Sqlite3 error: SQL logic error or missing database, near "ON": syntax error):
# "INSERT INTO t1 ( a ) SELECT 0 ON DUPLICATE KEY UPDATE a = a + VALUES (a)"