Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
9b4306b8
Commit
9b4306b8
authored
Feb 01, 2008
by
anozdrin/alik@quad
Browse files
Options
Browse Files
Download
Plain Diff
Merge quad.:/mnt/raid/alik/MySQL/devel/5.0-rt
into quad.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
parents
917c7952
1bf737a1
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
67 additions
and
17 deletions
+67
-17
client/mysqlcheck.c
client/mysqlcheck.c
+12
-7
configure.in
configure.in
+2
-0
extra/resolveip.c
extra/resolveip.c
+4
-2
mysql-test/r/mysqlcheck.result
mysql-test/r/mysqlcheck.result
+11
-0
mysql-test/r/variables.result
mysql-test/r/variables.result
+1
-1
mysql-test/t/mysqlcheck.test
mysql-test/t/mysqlcheck.test
+18
-0
sql/set_var.cc
sql/set_var.cc
+19
-7
No files found.
client/mysqlcheck.c
View file @
9b4306b8
...
...
@@ -512,14 +512,17 @@ static int process_all_tables_in_db(char *database)
{
MYSQL_RES
*
res
;
MYSQL_ROW
row
;
uint
num_columns
;
LINT_INIT
(
res
);
if
(
use_db
(
database
))
return
1
;
if
(
mysql_query
(
sock
,
"SHOW
TABLE STATU
S"
)
||
if
(
mysql_query
(
sock
,
"SHOW
/*!50002 FULL*/ TABLE
S"
)
||
!
((
res
=
mysql_store_result
(
sock
))))
return
1
;
num_columns
=
mysql_num_fields
(
res
);
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
))
;)
{
/* Skip tables with an engine of NULL (probably a view). */
if
(
row
[
1
])
{
end
=
fix_table_name
(
end
,
row
[
0
]);
*
end
++=
','
;
}
if
((
num_columns
==
2
)
&&
(
strcmp
(
row
[
1
],
"VIEW"
)
==
0
))
continue
;
end
=
fix_table_name
(
end
,
row
[
0
]);
*
end
++=
','
;
}
*--
end
=
0
;
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
((
num_columns
==
2
)
&&
(
strcmp
(
row
[
1
],
"VIEW"
)
==
0
))
continue
;
handle_request_for_tables
(
row
[
0
],
fixed_name_length
(
row
[
0
]));
}
}
...
...
configure.in
View file @
9b4306b8
...
...
@@ -799,6 +799,8 @@ AC_CHECK_FUNC(p2open, , AC_CHECK_LIB(gen, p2open))
AC_CHECK_FUNC
(
bind
, , AC_CHECK_LIB
(
bind
,
bind
))
# Check if crypt() exists in libc or libcrypt, sets LIBS if needed
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
AC_CHECK_FUNC
(
sched_yield, , AC_CHECK_LIB
(
posix4, sched_yield
))
...
...
extra/resolveip.c
View file @
9b4306b8
...
...
@@ -116,11 +116,13 @@ int main(int argc, char **argv)
while
(
argc
--
)
{
struct
in_addr
addr
;
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
))
{
puts
(
"Broadcast"
);
...
...
mysql-test/r/mysqlcheck.result
View file @
9b4306b8
...
...
@@ -62,6 +62,17 @@ create table `t 1`(a int);
test.t 1 OK
test.t`1 OK
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
create table t1(a int);
create view v1 as select * from t1;
...
...
mysql-test/r/variables.result
View file @
9b4306b8
...
...
@@ -220,7 +220,7 @@ select * from information_schema.global_variables where variable_name like 'myis
VARIABLE_NAME VARIABLE_VALUE
MYISAM_MAX_SORT_FILE_SIZE 1048576
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
myisam_max_sort_file_size FILE_SIZE
select * from information_schema.session_variables where variable_name like 'myisam_max_sort_file_size';
...
...
mysql-test/t/mysqlcheck.test
View file @
9b4306b8
...
...
@@ -46,6 +46,24 @@ create table `t 1`(a int);
--
exec
$MYSQL_CHECK
--
databases
test
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
#
...
...
sql/set_var.cc
View file @
9b4306b8
...
...
@@ -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_trans_mem_root
(
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
,
const
struct
my_option
*
option_limits
);
static
ulonglong
fix_unsigned
(
THD
*
,
ulonglong
,
const
struct
my_option
*
);
static
bool
get_unsigned
(
THD
*
thd
,
set_var
*
var
);
static
void
throw_bounds_warning
(
THD
*
thd
,
const
char
*
name
,
ulonglong
num
);
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
)
{
bool
not_used
;
pthread_mutex_lock
(
guard
);
*
value
=
(
ulong
)
option_limits
->
def_value
;
*
value
=
(
ulong
)
getopt_ull_limit_value
((
ulong
)
option_limits
->
def_value
,
option_limits
,
&
not_used
);
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
)
{
bool
not_used
;
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
,
&
not_used
);
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
)
{
bool
not_used
;
/* 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
,
&
not_used
);
}
else
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
)
{
bool
not_used
;
/* We will not come here if option_limits is not set */
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
,
&
not_used
);
pthread_mutex_unlock
(
&
LOCK_global_system_variables
);
}
else
...
...
@@ -1370,8 +1379,11 @@ void sys_var_thd_ulonglong::set_default(THD *thd, enum_var_type type)
{
if
(
type
==
OPT_GLOBAL
)
{
bool
not_used
;
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
,
&
not_used
);
pthread_mutex_unlock
(
&
LOCK_global_system_variables
);
}
else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment