Merge quad.:/mnt/raid/alik/MySQL/devel/5.0-rt
into quad.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
This commit is contained in:
commit
9b4306b8eb
@ -512,14 +512,17 @@ static int process_all_tables_in_db(char *database)
|
|||||||
{
|
{
|
||||||
MYSQL_RES *res;
|
MYSQL_RES *res;
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
|
uint num_columns;
|
||||||
|
|
||||||
LINT_INIT(res);
|
LINT_INIT(res);
|
||||||
if (use_db(database))
|
if (use_db(database))
|
||||||
return 1;
|
return 1;
|
||||||
if (mysql_query(sock, "SHOW TABLE STATUS") ||
|
if (mysql_query(sock, "SHOW /*!50002 FULL*/ TABLES") ||
|
||||||
!((res= mysql_store_result(sock))))
|
!((res= mysql_store_result(sock))))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
num_columns= mysql_num_fields(res);
|
||||||
|
|
||||||
if (opt_all_in_1)
|
if (opt_all_in_1)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -542,12 +545,11 @@ static int process_all_tables_in_db(char *database)
|
|||||||
}
|
}
|
||||||
for (end = tables + 1; (row = mysql_fetch_row(res)) ;)
|
for (end = tables + 1; (row = mysql_fetch_row(res)) ;)
|
||||||
{
|
{
|
||||||
/* Skip tables with an engine of NULL (probably a view). */
|
if ((num_columns == 2) && (strcmp(row[1], "VIEW") == 0))
|
||||||
if (row[1])
|
continue;
|
||||||
{
|
|
||||||
end= fix_table_name(end, row[0]);
|
end= fix_table_name(end, row[0]);
|
||||||
*end++= ',';
|
*end++= ',';
|
||||||
}
|
|
||||||
}
|
}
|
||||||
*--end = 0;
|
*--end = 0;
|
||||||
if (tot_length)
|
if (tot_length)
|
||||||
@ -563,6 +565,9 @@ static int process_all_tables_in_db(char *database)
|
|||||||
*/
|
*/
|
||||||
if (row[1] || what_to_do == DO_UPGRADE)
|
if (row[1] || what_to_do == DO_UPGRADE)
|
||||||
{
|
{
|
||||||
|
if ((num_columns == 2) && (strcmp(row[1], "VIEW") == 0))
|
||||||
|
continue;
|
||||||
|
|
||||||
handle_request_for_tables(row[0], fixed_name_length(row[0]));
|
handle_request_for_tables(row[0], fixed_name_length(row[0]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -799,6 +799,8 @@ AC_CHECK_FUNC(p2open, , AC_CHECK_LIB(gen, p2open))
|
|||||||
AC_CHECK_FUNC(bind, , AC_CHECK_LIB(bind, bind))
|
AC_CHECK_FUNC(bind, , AC_CHECK_LIB(bind, bind))
|
||||||
# Check if crypt() exists in libc or libcrypt, sets LIBS if needed
|
# Check if crypt() exists in libc or libcrypt, sets LIBS if needed
|
||||||
AC_SEARCH_LIBS(crypt, crypt, AC_DEFINE(HAVE_CRYPT, 1, [crypt]))
|
AC_SEARCH_LIBS(crypt, crypt, AC_DEFINE(HAVE_CRYPT, 1, [crypt]))
|
||||||
|
# See if we need a library for address lookup.
|
||||||
|
AC_SEARCH_LIBS(inet_aton, [socket nsl resolv])
|
||||||
|
|
||||||
# For the sched_yield() function on Solaris
|
# For the sched_yield() function on Solaris
|
||||||
AC_CHECK_FUNC(sched_yield, , AC_CHECK_LIB(posix4, sched_yield))
|
AC_CHECK_FUNC(sched_yield, , AC_CHECK_LIB(posix4, sched_yield))
|
||||||
|
@ -116,11 +116,13 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
while (argc--)
|
while (argc--)
|
||||||
{
|
{
|
||||||
|
struct in_addr addr;
|
||||||
ip = *argv++;
|
ip = *argv++;
|
||||||
|
|
||||||
if (my_isdigit(&my_charset_latin1,ip[0]))
|
/* Not compatible with IPv6! Probably should use getnameinfo(). */
|
||||||
|
if (inet_aton(ip, &addr) != 0)
|
||||||
{
|
{
|
||||||
taddr = inet_addr(ip);
|
taddr= addr.s_addr;
|
||||||
if (taddr == htonl(INADDR_BROADCAST))
|
if (taddr == htonl(INADDR_BROADCAST))
|
||||||
{
|
{
|
||||||
puts("Broadcast");
|
puts("Broadcast");
|
||||||
|
@ -62,6 +62,17 @@ create table `t 1`(a int);
|
|||||||
test.t 1 OK
|
test.t 1 OK
|
||||||
test.t`1 OK
|
test.t`1 OK
|
||||||
drop table `t``1`, `t 1`;
|
drop table `t``1`, `t 1`;
|
||||||
|
create database d_bug25347;
|
||||||
|
use d_bug25347;
|
||||||
|
create table t_bug25347 (a int);
|
||||||
|
create view v_bug25347 as select * from t_bug25347;
|
||||||
|
flush tables;
|
||||||
|
removing and creating
|
||||||
|
d_bug25347.t_bug25347 OK
|
||||||
|
drop view v_bug25347;
|
||||||
|
drop table t_bug25347;
|
||||||
|
drop database d_bug25347;
|
||||||
|
use test;
|
||||||
End of 5.0 tests
|
End of 5.0 tests
|
||||||
create table t1(a int);
|
create table t1(a int);
|
||||||
create view v1 as select * from t1;
|
create view v1 as select * from t1;
|
||||||
|
@ -220,7 +220,7 @@ select * from information_schema.global_variables where variable_name like 'myis
|
|||||||
VARIABLE_NAME VARIABLE_VALUE
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
MYISAM_MAX_SORT_FILE_SIZE 1048576
|
MYISAM_MAX_SORT_FILE_SIZE 1048576
|
||||||
set GLOBAL myisam_max_sort_file_size=default;
|
set GLOBAL myisam_max_sort_file_size=default;
|
||||||
show variables like 'myisam_max_sort_file_size';
|
show global variables like 'myisam_max_sort_file_size';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
myisam_max_sort_file_size FILE_SIZE
|
myisam_max_sort_file_size FILE_SIZE
|
||||||
select * from information_schema.session_variables where variable_name like 'myisam_max_sort_file_size';
|
select * from information_schema.session_variables where variable_name like 'myisam_max_sort_file_size';
|
||||||
|
@ -46,6 +46,24 @@ create table `t 1`(a int);
|
|||||||
--exec $MYSQL_CHECK --databases test
|
--exec $MYSQL_CHECK --databases test
|
||||||
drop table `t``1`, `t 1`;
|
drop table `t``1`, `t 1`;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#25347: mysqlcheck -A -r doesn't repair table marked as crashed
|
||||||
|
#
|
||||||
|
create database d_bug25347;
|
||||||
|
use d_bug25347;
|
||||||
|
create table t_bug25347 (a int);
|
||||||
|
create view v_bug25347 as select * from t_bug25347;
|
||||||
|
flush tables;
|
||||||
|
--echo removing and creating
|
||||||
|
--remove_file $MYSQLTEST_VARDIR/master-data/d_bug25347/t_bug25347.MYI
|
||||||
|
--write_file $MYSQLTEST_VARDIR/master-data/d_bug25347/t_bug25347.MYI
|
||||||
|
EOF
|
||||||
|
--exec $MYSQL_CHECK --repair --databases --use-frm d_bug25347
|
||||||
|
drop view v_bug25347;
|
||||||
|
drop table t_bug25347;
|
||||||
|
drop database d_bug25347;
|
||||||
|
use test;
|
||||||
|
|
||||||
--echo End of 5.0 tests
|
--echo End of 5.0 tests
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -120,8 +120,7 @@ static int check_max_delayed_threads(THD *thd, set_var *var);
|
|||||||
static void fix_thd_mem_root(THD *thd, enum_var_type type);
|
static void fix_thd_mem_root(THD *thd, enum_var_type type);
|
||||||
static void fix_trans_mem_root(THD *thd, enum_var_type type);
|
static void fix_trans_mem_root(THD *thd, enum_var_type type);
|
||||||
static void fix_server_id(THD *thd, enum_var_type type);
|
static void fix_server_id(THD *thd, enum_var_type type);
|
||||||
static ulonglong fix_unsigned(THD *thd, ulonglong num,
|
static ulonglong fix_unsigned(THD *, ulonglong, const struct my_option *);
|
||||||
const struct my_option *option_limits);
|
|
||||||
static bool get_unsigned(THD *thd, set_var *var);
|
static bool get_unsigned(THD *thd, set_var *var);
|
||||||
static void throw_bounds_warning(THD *thd, const char *name, ulonglong num);
|
static void throw_bounds_warning(THD *thd, const char *name, ulonglong num);
|
||||||
static KEY_CACHE *create_key_cache(const char *name, uint length);
|
static KEY_CACHE *create_key_cache(const char *name, uint length);
|
||||||
@ -1178,8 +1177,10 @@ bool sys_var_long_ptr_global::update(THD *thd, set_var *var)
|
|||||||
|
|
||||||
void sys_var_long_ptr_global::set_default(THD *thd, enum_var_type type)
|
void sys_var_long_ptr_global::set_default(THD *thd, enum_var_type type)
|
||||||
{
|
{
|
||||||
|
bool not_used;
|
||||||
pthread_mutex_lock(guard);
|
pthread_mutex_lock(guard);
|
||||||
*value= (ulong) option_limits->def_value;
|
*value= (ulong) getopt_ull_limit_value((ulong) option_limits->def_value,
|
||||||
|
option_limits, ¬_used);
|
||||||
pthread_mutex_unlock(guard);
|
pthread_mutex_unlock(guard);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1199,8 +1200,10 @@ bool sys_var_ulonglong_ptr::update(THD *thd, set_var *var)
|
|||||||
|
|
||||||
void sys_var_ulonglong_ptr::set_default(THD *thd, enum_var_type type)
|
void sys_var_ulonglong_ptr::set_default(THD *thd, enum_var_type type)
|
||||||
{
|
{
|
||||||
|
bool not_used;
|
||||||
pthread_mutex_lock(&LOCK_global_system_variables);
|
pthread_mutex_lock(&LOCK_global_system_variables);
|
||||||
*value= (ulonglong) option_limits->def_value;
|
*value= getopt_ull_limit_value((ulonglong) option_limits->def_value,
|
||||||
|
option_limits, ¬_used);
|
||||||
pthread_mutex_unlock(&LOCK_global_system_variables);
|
pthread_mutex_unlock(&LOCK_global_system_variables);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1277,8 +1280,11 @@ void sys_var_thd_ulong::set_default(THD *thd, enum_var_type type)
|
|||||||
{
|
{
|
||||||
if (type == OPT_GLOBAL)
|
if (type == OPT_GLOBAL)
|
||||||
{
|
{
|
||||||
|
bool not_used;
|
||||||
/* We will not come here if option_limits is not set */
|
/* We will not come here if option_limits is not set */
|
||||||
global_system_variables.*offset= (ulong) option_limits->def_value;
|
global_system_variables.*offset=
|
||||||
|
(ulong) getopt_ull_limit_value((ulong) option_limits->def_value,
|
||||||
|
option_limits, ¬_used);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
thd->variables.*offset= global_system_variables.*offset;
|
thd->variables.*offset= global_system_variables.*offset;
|
||||||
@ -1321,9 +1327,12 @@ void sys_var_thd_ha_rows::set_default(THD *thd, enum_var_type type)
|
|||||||
{
|
{
|
||||||
if (type == OPT_GLOBAL)
|
if (type == OPT_GLOBAL)
|
||||||
{
|
{
|
||||||
|
bool not_used;
|
||||||
/* We will not come here if option_limits is not set */
|
/* We will not come here if option_limits is not set */
|
||||||
pthread_mutex_lock(&LOCK_global_system_variables);
|
pthread_mutex_lock(&LOCK_global_system_variables);
|
||||||
global_system_variables.*offset= (ha_rows) option_limits->def_value;
|
global_system_variables.*offset=
|
||||||
|
(ha_rows) getopt_ull_limit_value((ha_rows) option_limits->def_value,
|
||||||
|
option_limits, ¬_used);
|
||||||
pthread_mutex_unlock(&LOCK_global_system_variables);
|
pthread_mutex_unlock(&LOCK_global_system_variables);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1370,8 +1379,11 @@ void sys_var_thd_ulonglong::set_default(THD *thd, enum_var_type type)
|
|||||||
{
|
{
|
||||||
if (type == OPT_GLOBAL)
|
if (type == OPT_GLOBAL)
|
||||||
{
|
{
|
||||||
|
bool not_used;
|
||||||
pthread_mutex_lock(&LOCK_global_system_variables);
|
pthread_mutex_lock(&LOCK_global_system_variables);
|
||||||
global_system_variables.*offset= (ulonglong) option_limits->def_value;
|
global_system_variables.*offset=
|
||||||
|
getopt_ull_limit_value((ulonglong) option_limits->def_value,
|
||||||
|
option_limits, ¬_used);
|
||||||
pthread_mutex_unlock(&LOCK_global_system_variables);
|
pthread_mutex_unlock(&LOCK_global_system_variables);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user