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
7b13560c
Commit
7b13560c
authored
Aug 17, 2003
by
monty@narttu.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into narttu.mysql.fi:/my/mysql-4.0
parents
2a53d5a6
d79cbc3b
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
19 deletions
+49
-19
myisam/myisamchk.c
myisam/myisamchk.c
+5
-4
sql/handler.cc
sql/handler.cc
+14
-3
sql/mysql_priv.h
sql/mysql_priv.h
+2
-1
sql/set_var.cc
sql/set_var.cc
+20
-2
sql/sql_parse.cc
sql/sql_parse.cc
+3
-2
sql/sql_show.cc
sql/sql_show.cc
+5
-7
No files found.
myisam/myisamchk.c
View file @
7b13560c
...
@@ -1400,21 +1400,22 @@ static int mi_sort_records(MI_CHECK *param,
...
@@ -1400,21 +1400,22 @@ static int mi_sort_records(MI_CHECK *param,
if
(
!
(((
ulonglong
)
1
<<
sort_key
)
&
share
->
state
.
key_map
))
if
(
!
(((
ulonglong
)
1
<<
sort_key
)
&
share
->
state
.
key_map
))
{
{
mi_check_print_error
(
param
,
"Can't sort table '%s' on key %d; No such key"
,
mi_check_print_warning
(
param
,
"Can't sort table '%s' on key %d; No such key"
,
name
,
sort_key
+
1
);
name
,
sort_key
+
1
);
param
->
error_printed
=
0
;
param
->
error_printed
=
0
;
DBUG_RETURN
(
0
);
/* Nothing to do */
DBUG_RETURN
(
0
);
/* Nothing to do */
}
}
if
(
keyinfo
->
flag
&
HA_FULLTEXT
)
if
(
keyinfo
->
flag
&
HA_FULLTEXT
)
{
{
mi_check_print_
error
(
param
,
"Can't sort table '%s' on FULLTEXT key %d"
,
mi_check_print_
warning
(
param
,
"Can't sort table '%s' on FULLTEXT key %d"
,
name
,
sort_key
+
1
);
name
,
sort_key
+
1
);
param
->
error_printed
=
0
;
param
->
error_printed
=
0
;
DBUG_RETURN
(
0
);
/* Nothing to do */
DBUG_RETURN
(
0
);
/* Nothing to do */
}
}
if
(
share
->
data_file_type
==
COMPRESSED_RECORD
)
if
(
share
->
data_file_type
==
COMPRESSED_RECORD
)
{
{
mi_check_print_
error
(
param
,
"Can't sort read-only table '%s'"
,
name
);
mi_check_print_
warning
(
param
,
"Can't sort read-only table '%s'"
,
name
);
param
->
error_printed
=
0
;
param
->
error_printed
=
0
;
DBUG_RETURN
(
0
);
/* Nothing to do */
DBUG_RETURN
(
0
);
/* Nothing to do */
}
}
...
...
sql/handler.cc
View file @
7b13560c
...
@@ -1020,14 +1020,25 @@ int ha_create_table(const char *name, HA_CREATE_INFO *create_info,
...
@@ -1020,14 +1020,25 @@ int ha_create_table(const char *name, HA_CREATE_INFO *create_info,
void
ha_key_cache
(
void
)
void
ha_key_cache
(
void
)
{
{
if
(
keybuff_size
)
/*
(
void
)
init_key_cache
((
ulong
)
keybuff_size
);
The following mutex is not really needed as long as keybuff_size is
treated as a long value, but we use the mutex here to guard for future
changes.
*/
pthread_mutex_lock
(
&
LOCK_global_system_variables
);
long
tmp
=
keybuff_size
;
pthread_mutex_unlock
(
&
LOCK_global_system_variables
);
if
(
tmp
)
(
void
)
init_key_cache
(
tmp
);
}
}
void
ha_resize_key_cache
(
void
)
void
ha_resize_key_cache
(
void
)
{
{
(
void
)
resize_key_cache
((
ulong
)
keybuff_size
);
pthread_mutex_lock
(
&
LOCK_global_system_variables
);
long
tmp
=
keybuff_size
;
pthread_mutex_unlock
(
&
LOCK_global_system_variables
);
(
void
)
resize_key_cache
(
tmp
);
}
}
...
...
sql/mysql_priv.h
View file @
7b13560c
...
@@ -507,7 +507,8 @@ void mysqld_list_processes(THD *thd,const char *user,bool verbose);
...
@@ -507,7 +507,8 @@ void mysqld_list_processes(THD *thd,const char *user,bool verbose);
int
mysqld_show_status
(
THD
*
thd
);
int
mysqld_show_status
(
THD
*
thd
);
int
mysqld_show_variables
(
THD
*
thd
,
const
char
*
wild
);
int
mysqld_show_variables
(
THD
*
thd
,
const
char
*
wild
);
int
mysqld_show
(
THD
*
thd
,
const
char
*
wild
,
show_var_st
*
variables
,
int
mysqld_show
(
THD
*
thd
,
const
char
*
wild
,
show_var_st
*
variables
,
enum
enum_var_type
value_type
);
enum
enum_var_type
value_type
,
pthread_mutex_t
*
mutex
);
/* sql_handler.cc */
/* sql_handler.cc */
int
mysql_ha_open
(
THD
*
thd
,
TABLE_LIST
*
tables
);
int
mysql_ha_open
(
THD
*
thd
,
TABLE_LIST
*
tables
);
...
...
sql/set_var.cc
View file @
7b13560c
...
@@ -729,10 +729,12 @@ void fix_max_relay_log_size(THD *thd, enum_var_type type)
...
@@ -729,10 +729,12 @@ void fix_max_relay_log_size(THD *thd, enum_var_type type)
bool
sys_var_long_ptr
::
update
(
THD
*
thd
,
set_var
*
var
)
bool
sys_var_long_ptr
::
update
(
THD
*
thd
,
set_var
*
var
)
{
{
ulonglong
tmp
=
var
->
value
->
val_int
();
ulonglong
tmp
=
var
->
value
->
val_int
();
pthread_mutex_lock
(
&
LOCK_global_system_variables
);
if
(
option_limits
)
if
(
option_limits
)
*
value
=
(
ulong
)
getopt_ull_limit_value
(
tmp
,
option_limits
);
*
value
=
(
ulong
)
getopt_ull_limit_value
(
tmp
,
option_limits
);
else
else
*
value
=
(
ulong
)
tmp
;
*
value
=
(
ulong
)
tmp
;
pthread_mutex_unlock
(
&
LOCK_global_system_variables
);
return
0
;
return
0
;
}
}
...
@@ -746,17 +748,21 @@ void sys_var_long_ptr::set_default(THD *thd, enum_var_type type)
...
@@ -746,17 +748,21 @@ void sys_var_long_ptr::set_default(THD *thd, enum_var_type type)
bool
sys_var_ulonglong_ptr
::
update
(
THD
*
thd
,
set_var
*
var
)
bool
sys_var_ulonglong_ptr
::
update
(
THD
*
thd
,
set_var
*
var
)
{
{
ulonglong
tmp
=
var
->
value
->
val_int
();
ulonglong
tmp
=
var
->
value
->
val_int
();
pthread_mutex_lock
(
&
LOCK_global_system_variables
);
if
(
option_limits
)
if
(
option_limits
)
*
value
=
(
ulonglong
)
getopt_ull_limit_value
(
tmp
,
option_limits
);
*
value
=
(
ulonglong
)
getopt_ull_limit_value
(
tmp
,
option_limits
);
else
else
*
value
=
(
ulonglong
)
tmp
;
*
value
=
(
ulonglong
)
tmp
;
pthread_mutex_unlock
(
&
LOCK_global_system_variables
);
return
0
;
return
0
;
}
}
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
)
{
{
pthread_mutex_lock
(
&
LOCK_global_system_variables
);
*
value
=
(
ulonglong
)
option_limits
->
def_value
;
*
value
=
(
ulonglong
)
option_limits
->
def_value
;
pthread_mutex_unlock
(
&
LOCK_global_system_variables
);
}
}
...
@@ -1000,9 +1006,21 @@ Item *sys_var::item(THD *thd, enum_var_type var_type)
...
@@ -1000,9 +1006,21 @@ Item *sys_var::item(THD *thd, enum_var_type var_type)
case
SHOW_LONG
:
case
SHOW_LONG
:
return
new
Item_uint
((
int32
)
*
(
ulong
*
)
value_ptr
(
thd
,
var_type
));
return
new
Item_uint
((
int32
)
*
(
ulong
*
)
value_ptr
(
thd
,
var_type
));
case
SHOW_LONGLONG
:
case
SHOW_LONGLONG
:
return
new
Item_int
(
*
(
longlong
*
)
value_ptr
(
thd
,
var_type
));
{
longlong
value
;
pthread_mutex_lock
(
&
LOCK_global_system_variables
);
value
=
*
(
longlong
*
)
value_ptr
(
thd
,
var_type
);
pthread_mutex_unlock
(
&
LOCK_global_system_variables
);
return
new
Item_int
(
value
);
}
case
SHOW_HA_ROWS
:
case
SHOW_HA_ROWS
:
return
new
Item_int
((
longlong
)
*
(
ha_rows
*
)
value_ptr
(
thd
,
var_type
));
{
ha_rows
value
;
pthread_mutex_lock
(
&
LOCK_global_system_variables
);
value
=
*
(
ha_rows
*
)
value_ptr
(
thd
,
var_type
);
pthread_mutex_unlock
(
&
LOCK_global_system_variables
);
return
new
Item_int
((
longlong
)
value
);
}
case
SHOW_MY_BOOL
:
case
SHOW_MY_BOOL
:
return
new
Item_int
((
int32
)
*
(
my_bool
*
)
value_ptr
(
thd
,
var_type
),
1
);
return
new
Item_int
((
int32
)
*
(
my_bool
*
)
value_ptr
(
thd
,
var_type
),
1
);
case
SHOW_CHAR
:
case
SHOW_CHAR
:
...
...
sql/sql_parse.cc
View file @
7b13560c
...
@@ -2146,11 +2146,12 @@ mysql_execute_command(void)
...
@@ -2146,11 +2146,12 @@ mysql_execute_command(void)
break
;
break
;
case
SQLCOM_SHOW_STATUS
:
case
SQLCOM_SHOW_STATUS
:
res
=
mysqld_show
(
thd
,(
lex
->
wild
?
lex
->
wild
->
ptr
()
:
NullS
),
status_vars
,
res
=
mysqld_show
(
thd
,(
lex
->
wild
?
lex
->
wild
->
ptr
()
:
NullS
),
status_vars
,
OPT_GLOBAL
);
OPT_GLOBAL
,
&
LOCK_status
);
break
;
break
;
case
SQLCOM_SHOW_VARIABLES
:
case
SQLCOM_SHOW_VARIABLES
:
res
=
mysqld_show
(
thd
,
(
lex
->
wild
?
lex
->
wild
->
ptr
()
:
NullS
),
res
=
mysqld_show
(
thd
,
(
lex
->
wild
?
lex
->
wild
->
ptr
()
:
NullS
),
init_vars
,
lex
->
option_type
);
init_vars
,
lex
->
option_type
,
&
LOCK_global_system_variables
);
break
;
break
;
case
SQLCOM_SHOW_LOGS
:
case
SQLCOM_SHOW_LOGS
:
{
{
...
...
sql/sql_show.cc
View file @
7b13560c
...
@@ -1158,7 +1158,8 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
...
@@ -1158,7 +1158,8 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
int
mysqld_show
(
THD
*
thd
,
const
char
*
wild
,
show_var_st
*
variables
,
int
mysqld_show
(
THD
*
thd
,
const
char
*
wild
,
show_var_st
*
variables
,
enum
enum_var_type
value_type
)
enum
enum_var_type
value_type
,
pthread_mutex_t
*
mutex
)
{
{
char
buff
[
8192
];
char
buff
[
8192
];
String
packet2
(
buff
,
sizeof
(
buff
));
String
packet2
(
buff
,
sizeof
(
buff
));
...
@@ -1171,8 +1172,7 @@ int mysqld_show(THD *thd, const char *wild, show_var_st *variables,
...
@@ -1171,8 +1172,7 @@ int mysqld_show(THD *thd, const char *wild, show_var_st *variables,
if
(
send_fields
(
thd
,
field_list
,
1
))
if
(
send_fields
(
thd
,
field_list
,
1
))
DBUG_RETURN
(
1
);
/* purecov: inspected */
DBUG_RETURN
(
1
);
/* purecov: inspected */
/* pthread_mutex_lock(&THR_LOCK_keycache); */
pthread_mutex_lock
(
mutex
);
pthread_mutex_lock
(
&
LOCK_status
);
for
(;
variables
->
name
;
variables
++
)
for
(;
variables
->
name
;
variables
++
)
{
{
if
(
!
(
wild
&&
wild
[
0
]
&&
wild_case_compare
(
variables
->
name
,
wild
)))
if
(
!
(
wild
&&
wild
[
0
]
&&
wild_case_compare
(
variables
->
name
,
wild
)))
...
@@ -1413,14 +1413,12 @@ int mysqld_show(THD *thd, const char *wild, show_var_st *variables,
...
@@ -1413,14 +1413,12 @@ int mysqld_show(THD *thd, const char *wild, show_var_st *variables,
goto
err
;
/* purecov: inspected */
goto
err
;
/* purecov: inspected */
}
}
}
}
pthread_mutex_unlock
(
&
LOCK_status
);
pthread_mutex_unlock
(
&
mutex
);
/* pthread_mutex_unlock(&THR_LOCK_keycache); */
send_eof
(
&
thd
->
net
);
send_eof
(
&
thd
->
net
);
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
err:
err:
pthread_mutex_unlock
(
&
LOCK_status
);
pthread_mutex_unlock
(
&
mutex
);
/* pthread_mutex_unlock(&THR_LOCK_keycache); */
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
}
}
...
...
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