mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
merge
innobase/btr/btr0cur.c: Auto merged innobase/dict/dict0dict.c: Auto merged innobase/sync/sync0arr.c: Auto merged sql/mysqld.cc: Auto merged sql/table.cc: Auto merged sql/unireg.cc: Auto merged Docs/manual.texi: Merge
This commit is contained in:
@ -768,6 +768,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
thd->lex.select_lex.options=0; // We store status here
|
||||
switch (command) {
|
||||
case COM_INIT_DB:
|
||||
thread_safe_increment(com_stat[SQLCOM_CHANGE_DB],&LOCK_thread_count);
|
||||
if (!mysql_change_db(thd,packet))
|
||||
mysql_log.write(thd,command,"%s",thd->db);
|
||||
break;
|
||||
@ -781,6 +782,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
}
|
||||
case COM_TABLE_DUMP:
|
||||
{
|
||||
thread_safe_increment(com_other,&LOCK_thread_count);
|
||||
slow_command = TRUE;
|
||||
uint db_len = *(uchar*)packet;
|
||||
uint tbl_len = *(uchar*)(packet + db_len + 1);
|
||||
@ -797,6 +799,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
}
|
||||
case COM_CHANGE_USER:
|
||||
{
|
||||
thread_safe_increment(com_other,&LOCK_thread_count);
|
||||
char *user= (char*) packet;
|
||||
char *passwd= strend(user)+1;
|
||||
char *db= strend(passwd)+1;
|
||||
@ -863,6 +866,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
{
|
||||
char *fields;
|
||||
TABLE_LIST table_list;
|
||||
thread_safe_increment(com_stat[SQLCOM_SHOW_FIELDS],&LOCK_thread_count);
|
||||
bzero((char*) &table_list,sizeof(table_list));
|
||||
if (!(table_list.db=thd->db))
|
||||
{
|
||||
@ -887,6 +891,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
}
|
||||
#endif
|
||||
case COM_QUIT:
|
||||
/* We don't calculate statistics for this command */
|
||||
mysql_log.write(thd,command,NullS);
|
||||
net->error=0; // Don't give 'abort' message
|
||||
error=TRUE; // End server
|
||||
@ -894,6 +899,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
|
||||
case COM_CREATE_DB: // QQ: To be removed
|
||||
{
|
||||
thread_safe_increment(com_stat[SQLCOM_CREATE_DB],&LOCK_thread_count);
|
||||
char *db=thd->strdup(packet);
|
||||
// null test to handle EOM
|
||||
if (!db || !stripp_sp(db) || check_db_name(db))
|
||||
@ -909,6 +915,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
}
|
||||
case COM_DROP_DB: // QQ: To be removed
|
||||
{
|
||||
thread_safe_increment(com_stat[SQLCOM_DROP_DB],&LOCK_thread_count);
|
||||
char *db=thd->strdup(packet);
|
||||
// null test to handle EOM
|
||||
if (!db || !stripp_sp(db) || check_db_name(db))
|
||||
@ -927,6 +934,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
}
|
||||
case COM_BINLOG_DUMP:
|
||||
{
|
||||
thread_safe_increment(com_other,&LOCK_thread_count);
|
||||
slow_command = TRUE;
|
||||
if (check_access(thd, FILE_ACL, any_db))
|
||||
break;
|
||||
@ -951,6 +959,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
}
|
||||
case COM_REFRESH:
|
||||
{
|
||||
thread_safe_increment(com_stat[SQLCOM_FLUSH],&LOCK_thread_count);
|
||||
ulong options= (ulong) (uchar) packet[0];
|
||||
if (check_access(thd,RELOAD_ACL,any_db))
|
||||
break;
|
||||
@ -962,6 +971,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
break;
|
||||
}
|
||||
case COM_SHUTDOWN:
|
||||
thread_safe_increment(com_other,&LOCK_thread_count);
|
||||
if (check_access(thd,SHUTDOWN_ACL,any_db))
|
||||
break; /* purecov: inspected */
|
||||
DBUG_PRINT("quit",("Got shutdown command"));
|
||||
@ -983,6 +993,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
case COM_STATISTICS:
|
||||
{
|
||||
mysql_log.write(thd,command,NullS);
|
||||
thread_safe_increment(com_stat[SQLCOM_SHOW_STATUS],&LOCK_thread_count);
|
||||
char buff[200];
|
||||
ulong uptime = (ulong) (thd->start_time - start_time);
|
||||
sprintf((char*) buff,
|
||||
@ -1001,9 +1012,11 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
break;
|
||||
}
|
||||
case COM_PING:
|
||||
thread_safe_increment(com_other,&LOCK_thread_count);
|
||||
send_ok(net); // Tell client we are alive
|
||||
break;
|
||||
case COM_PROCESS_INFO:
|
||||
thread_safe_increment(com_stat[SQLCOM_SHOW_PROCESSLIST],&LOCK_thread_count);
|
||||
if (!thd->priv_user[0] && check_process_priv(thd))
|
||||
break;
|
||||
mysql_log.write(thd,command,NullS);
|
||||
@ -1012,11 +1025,13 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
break;
|
||||
case COM_PROCESS_KILL:
|
||||
{
|
||||
thread_safe_increment(com_stat[SQLCOM_KILL],&LOCK_thread_count);
|
||||
ulong id=(ulong) uint4korr(packet);
|
||||
kill_one_thread(thd,id);
|
||||
break;
|
||||
}
|
||||
case COM_DEBUG:
|
||||
thread_safe_increment(com_other,&LOCK_thread_count);
|
||||
if (check_process_priv(thd))
|
||||
break; /* purecov: inspected */
|
||||
mysql_print_status(thd);
|
||||
@ -1093,6 +1108,7 @@ mysql_execute_command(void)
|
||||
!tables_ok(thd,tables)))
|
||||
DBUG_VOID_RETURN;
|
||||
|
||||
thread_safe_increment(com_stat[lex->sql_command],&LOCK_thread_count);
|
||||
switch (lex->sql_command) {
|
||||
case SQLCOM_SELECT:
|
||||
{
|
||||
|
Reference in New Issue
Block a user