mirror of
https://github.com/MariaDB/server.git
synced 2025-08-31 22:22:30 +03:00
A lot of portability fixes.
Added rename table for BDB. This fixes a bug in ALTER TABLE with BDB tables. BUILD/SETUP.sh: Enabled uninitalized warnings for debug builds. Build-tools/Do-compile: Added options --no-mysqltest and --no-benchmarks Log time before each stage Removed warnings on some OS (at least hpux11) acinclude.m4: Fixed call to wrong function configure.in: Don't use -O3 as compiler option with aCC innobase/include/univ.i: Removed compiler warning (on Hpux11) innobase/os/os0file.c: Removed compiler warning (on Hpux11) innobase/trx/trx0sys.c: Removed compiler warning (on Hpux11) innobase/trx/trx0trx.c: Removed compiler warning (on Hpux11) innobase/ut/ut0ut.c: Removed compiler warning (with gcc) myisam/mi_check.c: Added missing 'static' myisam/mi_test1.c: Added missing 'static' mysys/my_getopt.c: Added missing 'static' sql/ha_berkeley.cc: Added rename table. This fixes a bug in ALTER TABLE with BDB tables. Fixed compilation problem on OSF1 sql/ha_berkeley.h: Added rename table. This fixes a bug in ALTER TABLE with BDB tables. sql/mini_client.cc: Added reinterpret cast to avoid some warnings. sql/sql_parse.cc: Added reinterpret cast to avoid some warnings. Removed usage of strnlen() as this gave portability problems. sql/sql_union.cc: Added reinterpret cast to avoid some warnings. sql/table.cc: Added reinterpret cast to avoid some warnings. tools/mysqlmanager.c: Added missing 'static'
This commit is contained in:
@@ -497,7 +497,8 @@ check_connections(THD *thd)
|
||||
{
|
||||
vio_in_addr(net->vio,&thd->remote.sin_addr);
|
||||
thd->host=ip_to_hostname(&thd->remote.sin_addr,&connect_errors);
|
||||
thd->host[strnlen(thd->host, HOSTNAME_LENGTH)]= 0;
|
||||
/* Cut very long hostnames to avoid possible overflows */
|
||||
thd->host[min(strlen(thd->host), HOSTNAME_LENGTH)]= 0;
|
||||
if (connect_errors > max_connect_errors)
|
||||
return(ER_HOST_IS_BLOCKED);
|
||||
}
|
||||
@@ -2012,7 +2013,8 @@ mysql_execute_command(void)
|
||||
goto error;
|
||||
}
|
||||
walk->lock_type= auxi->lock_type;
|
||||
auxi->table= (TABLE *) walk; // Remember corresponding table
|
||||
// Store address to table as we need it later
|
||||
auxi->table= my_reinterpret_cast(TABLE *) (walk);
|
||||
}
|
||||
if (add_item_to_list(new Item_null()))
|
||||
{
|
||||
@@ -2025,7 +2027,8 @@ mysql_execute_command(void)
|
||||
break;
|
||||
/* Fix tables-to-be-deleted-from list to point at opened tables */
|
||||
for (auxi=(TABLE_LIST*) aux_tables ; auxi ; auxi=auxi->next)
|
||||
auxi->table= ((TABLE_LIST*) auxi->table)->table;
|
||||
auxi->table= (my_reinterpret_cast(TABLE_LIST*) (auxi->table))->table;
|
||||
|
||||
if (!thd->fatal_error && (result= new multi_delete(thd,aux_tables,
|
||||
table_count)))
|
||||
{
|
||||
@@ -3321,7 +3324,7 @@ static bool create_total_list(THD *thd, LEX *lex, TABLE_LIST **result)
|
||||
}
|
||||
else
|
||||
aux->shared=1; // Mark that it's used twice
|
||||
aux->table=(TABLE *) cursor;
|
||||
aux->table= my_reinterpret_cast(TABLE *) (cursor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user