From 347ca41e26757fb93afff6bc1374b5e5951e66b1 Mon Sep 17 00:00:00 2001 From: lazio579 Date: Thu, 10 Jan 2019 17:12:25 +0800 Subject: [PATCH] Support set autocommit=on --- lib/sql-context.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/sql-context.c b/lib/sql-context.c index 5d3143b..1d4de71 100644 --- a/lib/sql-context.c +++ b/lib/sql-context.c @@ -216,6 +216,13 @@ sql_context_is_autocommit_on(sql_context_t *context) gboolean on; if (sql_expr_is_boolean(expr->right, &on)) { return on; + } else { + sql_expr_t *p = expr->right; + if (p && p->op == TK_ON) { + if (strcasecmp(p->token_text, "on") == 0) { + return TRUE; + } + } } } }