summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2017-01-04 13:26:09 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2017-01-04 13:27:45 +0100
commitbc4cac358ed0d08daaa3cb869b3ecc444afa09fa (patch)
treeaf059e932b6ab8dd758e8dae6920b9b23b74d3e1 /sql/sql_select.cc
parent80d5d1452a4a6b7bd1627116f2a5a950003fc3cb (diff)
downloadmariadb-git-bc4cac358ed0d08daaa3cb869b3ecc444afa09fa.tar.gz
MDEV-10035: DBUG_ASSERT on CREATE VIEW v1 AS SELECT * FROM t1 FOR UPDATE
Ability to print lock type added. Restoring correct lock type for CREATE VIEW added.
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index f345d3c9687..09ceb16fcba 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -24592,6 +24592,12 @@ void st_select_lex::print(THD *thd, String *str, enum_query_type query_type)
// limit
print_limit(thd, str, query_type);
+ // lock type
+ if (lock_type == TL_READ_WITH_SHARED_LOCKS)
+ str->append(" lock in share mode");
+ else if (lock_type == TL_WRITE)
+ str->append(" for update");
+
// PROCEDURE unsupported here
}