提交 9b9baac8 authored 作者: Thomas Mueller's avatar Thomas Mueller

The following built-in functions were marked as deterministic and therefore not…

The following built-in functions were marked as deterministic and therefore not re-executed when using in a prepared statement: LOCK_TIMEOUT, LINK_SCHEMA, CANCEL_SESSION, FILE_READ
上级 cebe254a
......@@ -303,7 +303,7 @@ public class Function extends Expression implements FunctionCall {
addFunctionNotDeterministic("AUTOCOMMIT", AUTOCOMMIT, 0, Value.BOOLEAN);
addFunctionNotDeterministic("READONLY", READONLY, 0, Value.BOOLEAN);
addFunction("DATABASE_PATH", DATABASE_PATH, 0, Value.STRING);
addFunction("LOCK_TIMEOUT", LOCK_TIMEOUT, 0, Value.INT);
addFunctionNotDeterministic("LOCK_TIMEOUT", LOCK_TIMEOUT, 0, Value.INT);
addFunctionWithNull("IFNULL", IFNULL, 2, Value.NULL);
addFunctionWithNull("CASEWHEN", CASEWHEN, 3, Value.NULL);
addFunctionWithNull("CONVERT", CONVERT, 1, Value.NULL);
......@@ -325,12 +325,12 @@ public class Function extends Expression implements FunctionCall {
addFunctionNotDeterministic("SCHEMA", SCHEMA, 0, Value.STRING);
addFunctionNotDeterministic("SESSION_ID", SESSION_ID, 0, Value.INT);
addFunction("ARRAY_LENGTH", ARRAY_LENGTH, 1, Value.INT);
addFunction("LINK_SCHEMA", LINK_SCHEMA, 6, Value.RESULT_SET);
addFunctionNotDeterministic("LINK_SCHEMA", LINK_SCHEMA, 6, Value.RESULT_SET);
addFunctionWithNull("LEAST", LEAST, VAR_ARGS, Value.NULL);
addFunctionWithNull("GREATEST", GREATEST, VAR_ARGS, Value.NULL);
addFunction("CANCEL_SESSION", CANCEL_SESSION, 1, Value.BOOLEAN);
addFunctionNotDeterministic("CANCEL_SESSION", CANCEL_SESSION, 1, Value.BOOLEAN);
addFunction("SET", SET, 2, Value.NULL, false, false, false);
addFunction("FILE_READ", FILE_READ, VAR_ARGS, Value.NULL, false, true, false);
addFunction("FILE_READ", FILE_READ, VAR_ARGS, Value.NULL, false, false, false);
addFunctionNotDeterministic("TRANSACTION_ID", TRANSACTION_ID, 0, Value.STRING);
// TableFunction
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论