summaryrefslogtreecommitdiff
path: root/sql/sql_view.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2004-07-20 18:51:02 +0300
committerunknown <bell@sanja.is.com.ua>2004-07-20 18:51:02 +0300
commitb0b75bbfbb8df74a0bc31cabe7d75c93dff5410e (patch)
tree0acc3c0e71f4359fe96f59062bf2da7efcc94abd /sql/sql_view.cc
parent9050c44cffd26d7ff24c5c7413d1126f22078671 (diff)
downloadmariadb-git-b0b75bbfbb8df74a0bc31cabe7d75c93dff5410e.tar.gz
fixed quoting of identifiers in VIEWs (BUG#4613)
mysql-test/r/view.result: fixed quoting of identifiers in VIEWs mysql-test/t/view.test: fixed quoting of identifiers in VIEWs sql/item.cc: fixed quoting of identifiers in VIEWs sql/sql_select.cc: fixed quoting of identifiers in VIEWs sql/sql_view.cc: fixed quoting of identifiers in VIEWs
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r--sql/sql_view.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index c558d1c5d34..a5565c95417 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -356,7 +356,12 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view,
// print query
str.length(0);
- thd->lex->unit.print(&str);
+ {
+ ulong sql_mode= thd->variables.sql_mode & MODE_ANSI_QUOTES;
+ thd->variables.sql_mode&= ~MODE_ANSI_QUOTES;
+ thd->lex->unit.print(&str);
+ thd->variables.sql_mode|= sql_mode;
+ }
str.append('\0');
DBUG_PRINT("VIEW", ("View: %s", str.ptr()));