mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Fixed many compiler warnings
Fixed bugs in group_concat with ORDER BY and DISTINCT (Bugs #2695, #3381 and #3319) Fixed crash when doing rollback in slave and the io thread catched up with the sql thread Set locked_in_memory properly include/mysql_com.h: Fixed compiler warning libmysqld/emb_qcache.cc: Removed not used variable libmysqld/lib_sql.cc: Removed not used variable myisam/mi_locking.c: Added comment myisam/mi_rnext.c: Fixed bug in concurrent insert myisam/mi_rprev.c: Simple optimization mysql-test/r/func_gconcat.result: New tests mysql-test/t/func_gconcat.test: New tests mysql-test/t/func_group.test: Cleanup sql-common/client.c: Removed compiler warning sql/derror.cc: Better comments sql/field.cc: Removed not used function/variable sql/field.h: Removed not needed variable sql/ha_innodb.cc: Removed not used function sql/item.cc: Fixed compiler warning sql/item_cmpfunc.cc: Fixed compiler warning sql/item_func.cc: Fixed compiler warning sql/item_geofunc.cc: Fixed compiler warning sql/item_sum.cc: Fixed bugs in group_concat and added more comments (Bugs #2695, #3381 and #3319) - field->abs_offset was not needed - Wrong assumption of field order in temporary table - Some not used variables removed - Added ORDER BY fields after argument fields so that code in sql_select.cc can move all fields to point to temporary tables, if needed. - Optimized loops sql/item_sum.h: Bug fixing and cleanup of group_concat() sql/log.cc: Removed wrong comment sql/log_event.cc: Removed compiler warning sql/mysqld.cc: Set locked_in_memory properly sql/protocol.cc: Removed compiler warning sql/set_var.cc: Code cleanup sql/slave.cc: Fixed crash when doing rollback in slave and the io thread catched up with the sql thread sql/sql_cache.cc: Removed compiler warnings sql/sql_derived.cc: Removed not used variable sql/sql_insert.cc: Removed compiler warnings sql/sql_lex.cc: Removed not used lable sql/sql_lex.h: Removed compiler warnings sql/sql_parse.cc: Removed compiler warnings sql/sql_prepare.cc: Removed compiler warnings sql/sql_select.cc: Removed not used variables Added function comments sql/sql_show.cc: Removed compiler warnings sql/sql_yacc.yy: Fix for ORDER BY handling in GROUP_CONCAT()
This commit is contained in:
@@ -48,7 +48,9 @@
|
||||
extern "C" int gethostname(char *name, int namelen);
|
||||
#endif
|
||||
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
static int check_for_max_user_connections(THD *thd, USER_CONN *uc);
|
||||
#endif
|
||||
static void decrease_user_connections(USER_CONN *uc);
|
||||
static bool check_db_used(THD *thd,TABLE_LIST *tables);
|
||||
static bool check_merge_table_access(THD *thd, char *db, TABLE_LIST *tables);
|
||||
@@ -426,6 +428,8 @@ void init_max_user_conn(void)
|
||||
1 error
|
||||
*/
|
||||
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
|
||||
static int check_for_max_user_connections(THD *thd, USER_CONN *uc)
|
||||
{
|
||||
int error=0;
|
||||
@@ -456,7 +460,7 @@ static int check_for_max_user_connections(THD *thd, USER_CONN *uc)
|
||||
(void) pthread_mutex_unlock(&LOCK_user_conn);
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
#endif /* NO_EMBEDDED_ACCESS_CHECKS */
|
||||
|
||||
/*
|
||||
Decrease user connection count
|
||||
@@ -545,15 +549,15 @@ bool is_update_query(enum enum_sql_command command)
|
||||
|
||||
static bool check_mqh(THD *thd, uint check_command)
|
||||
{
|
||||
#ifdef NO_EMBEDDED_ACCESS_CHECKS
|
||||
return(0);
|
||||
#else
|
||||
bool error=0;
|
||||
time_t check_time = thd->start_time ? thd->start_time : time(NULL);
|
||||
USER_CONN *uc=thd->user_connect;
|
||||
DBUG_ENTER("check_mqh");
|
||||
DBUG_ASSERT(uc != 0);
|
||||
|
||||
#ifdef NO_EMBEDDED_ACCESS_CHECKS
|
||||
DBUG_RETURN(0);
|
||||
#else
|
||||
/* If more than a hour since last check, reset resource checking */
|
||||
if (check_time - uc->intime >= 3600)
|
||||
{
|
||||
@@ -3518,7 +3522,10 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
|
||||
DBUG_ENTER("check_access");
|
||||
DBUG_PRINT("enter",("want_access: %lu master_access: %lu", want_access,
|
||||
thd->master_access));
|
||||
ulong db_access,dummy;
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
ulong db_access;
|
||||
#endif
|
||||
ulong dummy;
|
||||
if (save_priv)
|
||||
*save_priv=0;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user