summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2002-08-08 03:29:36 +0300
committerunknown <monty@mashka.mysql.fi>2002-08-08 03:29:36 +0300
commita6b15fdd7682bffc2e197ac50e21332bb9bcf297 (patch)
treeda5d29e4a08217e2773b16c5aef05ab734c760e4 /sql/sql_parse.cc
parent93f5a0616ab15113844fa211a26c44182af8018c (diff)
parentf01f49916b7a0ea6eaf9f0e4e1dfad911584f8a2 (diff)
downloadmariadb-git-a6b15fdd7682bffc2e197ac50e21332bb9bcf297.tar.gz
merge
BitKeeper/etc/logging_ok: auto-union include/my_sys.h: Auto merged innobase/include/dyn0dyn.h: Auto merged innobase/include/dyn0dyn.ic: Auto merged myisam/mi_check.c: Auto merged sql/ha_berkeley.h: Auto merged sql/ha_innodb.h: Auto merged sql/item_func.cc: Auto merged sql/item_func.h: Auto merged sql/item_timefunc.h: Auto merged sql/lex.h: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_cache.cc: Auto merged sql/sql_delete.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_update.cc: Auto merged sql/sql_yacc.yy: Auto merged
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc27
1 files changed, 21 insertions, 6 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 3aff3255706..19b58ffbd25 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -23,6 +23,10 @@
#include <my_dir.h>
#include <assert.h>
+#ifdef HAVE_INNOBASE_DB
+#include "ha_innodb.h"
+#endif
+
#ifdef HAVE_OPENSSL
/*
Without SSL the handshake consists of one packet. This packet
@@ -1426,9 +1430,22 @@ mysql_execute_command(void)
case SQLCOM_LOAD_MASTER_DATA: // sync with master
if (check_global_access(thd, SUPER_ACL))
goto error;
- res = load_master_data(thd);
+ if (end_active_trans(thd))
+ res= -1;
+ else
+ res = load_master_data(thd);
break;
+#ifdef HAVE_INNOBASE_DB
+ case SQLCOM_SHOW_INNODB_STATUS:
+ {
+ if (check_global_access(thd, SUPER_ACL))
+ goto error;
+ res = innodb_show_status(thd);
+ break;
+ }
+#endif
+
case SQLCOM_LOAD_MASTER_TABLE:
{
if (!tables->db)
@@ -2307,7 +2324,7 @@ mysql_execute_command(void)
mysql_update_log.write(thd, thd->query, thd->query_length);
if (mysql_bin_log.is_open())
{
- Query_log_event qinfo(thd, thd->query);
+ Query_log_event qinfo(thd, thd->query, thd->query_length);
mysql_bin_log.write(&qinfo);
}
}
@@ -2327,7 +2344,7 @@ mysql_execute_command(void)
mysql_update_log.write(thd, thd->query, thd->query_length);
if (mysql_bin_log.is_open())
{
- Query_log_event qinfo(thd, thd->query);
+ Query_log_event qinfo(thd, thd->query, thd->query_length);
mysql_bin_log.write(&qinfo);
}
if (mqh_used && lex->sql_command == SQLCOM_GRANT)
@@ -3313,8 +3330,6 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables)
bool result=0;
select_errors=0; /* Write if more errors */
- // TODO: figure out what's up with the commented out line below
- // mysql_log.flush(); // Flush log
if (options & REFRESH_GRANT)
{
acl_reload();
@@ -3370,7 +3385,7 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables)
if (options & REFRESH_SLAVE)
{
LOCK_ACTIVE_MI;
- if (reset_slave(active_mi))
+ if (reset_slave(thd, active_mi))
result=1;
UNLOCK_ACTIVE_MI;
}