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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
c01fe971
Commit
c01fe971
authored
Jul 17, 2007
by
tnurnberg@sin.intern.azundris.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into sin.intern.azundris.com:/home/tnurnberg/27198/51-27198
parents
e5d23da4
bc3b4429
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
22 deletions
+39
-22
sql/mysql_priv.h
sql/mysql_priv.h
+20
-19
sql/sql_class.h
sql/sql_class.h
+19
-3
No files found.
sql/mysql_priv.h
View file @
c01fe971
...
@@ -719,6 +719,26 @@ bool end_active_trans(THD *thd);
...
@@ -719,6 +719,26 @@ bool end_active_trans(THD *thd);
int
end_trans
(
THD
*
thd
,
enum
enum_mysql_completiontype
completion
);
int
end_trans
(
THD
*
thd
,
enum
enum_mysql_completiontype
completion
);
Item
*
negate_expression
(
THD
*
thd
,
Item
*
expr
);
Item
*
negate_expression
(
THD
*
thd
,
Item
*
expr
);
/* log.cc */
int
vprint_msg_to_log
(
enum
loglevel
level
,
const
char
*
format
,
va_list
args
);
void
sql_print_error
(
const
char
*
format
,
...)
ATTRIBUTE_FORMAT
(
printf
,
1
,
2
);
void
sql_print_warning
(
const
char
*
format
,
...)
ATTRIBUTE_FORMAT
(
printf
,
1
,
2
);
void
sql_print_information
(
const
char
*
format
,
...)
ATTRIBUTE_FORMAT
(
printf
,
1
,
2
);
typedef
void
(
*
sql_print_message_func
)(
const
char
*
format
,
...)
ATTRIBUTE_FORMAT
(
printf
,
1
,
2
);
extern
sql_print_message_func
sql_print_message_handlers
[];
int
error_log_print
(
enum
loglevel
level
,
const
char
*
format
,
va_list
args
);
bool
slow_log_print
(
THD
*
thd
,
const
char
*
query
,
uint
query_length
,
time_t
query_start_arg
);
bool
general_log_print
(
THD
*
thd
,
enum
enum_server_command
command
,
const
char
*
format
,...);
#include "sql_class.h"
#include "sql_class.h"
#include "sql_acl.h"
#include "sql_acl.h"
#include "tztime.h"
#include "tztime.h"
...
@@ -1620,25 +1640,6 @@ bool init_errmessage(void);
...
@@ -1620,25 +1640,6 @@ bool init_errmessage(void);
#endif
/* MYSQL_SERVER */
#endif
/* MYSQL_SERVER */
void
sql_perror
(
const
char
*
message
);
void
sql_perror
(
const
char
*
message
);
int
vprint_msg_to_log
(
enum
loglevel
level
,
const
char
*
format
,
va_list
args
);
void
sql_print_error
(
const
char
*
format
,
...)
ATTRIBUTE_FORMAT
(
printf
,
1
,
2
);
void
sql_print_warning
(
const
char
*
format
,
...)
ATTRIBUTE_FORMAT
(
printf
,
1
,
2
);
void
sql_print_information
(
const
char
*
format
,
...)
ATTRIBUTE_FORMAT
(
printf
,
1
,
2
);
typedef
void
(
*
sql_print_message_func
)(
const
char
*
format
,
...)
ATTRIBUTE_FORMAT
(
printf
,
1
,
2
);
extern
sql_print_message_func
sql_print_message_handlers
[];
int
error_log_print
(
enum
loglevel
level
,
const
char
*
format
,
va_list
args
);
bool
slow_log_print
(
THD
*
thd
,
const
char
*
query
,
uint
query_length
,
time_t
query_start_arg
);
bool
general_log_print
(
THD
*
thd
,
enum
enum_server_command
command
,
const
char
*
format
,...);
bool
fn_format_relative_to_data_home
(
char
*
to
,
const
char
*
name
,
bool
fn_format_relative_to_data_home
(
char
*
to
,
const
char
*
name
,
const
char
*
dir
,
const
char
*
extension
);
const
char
*
dir
,
const
char
*
extension
);
#ifdef MYSQL_SERVER
#ifdef MYSQL_SERVER
...
...
sql/sql_class.h
View file @
c01fe971
...
@@ -1569,11 +1569,27 @@ public:
...
@@ -1569,11 +1569,27 @@ public:
proc_info
=
old_msg
;
proc_info
=
old_msg
;
pthread_mutex_unlock
(
&
mysys_var
->
mutex
);
pthread_mutex_unlock
(
&
mysys_var
->
mutex
);
}
}
static
inline
void
safe_time
(
time_t
*
t
)
{
/**
Wrapper around time() which retries on error (-1)
@details
This is needed because, despite the documentation, time() may fail
in some circumstances. Here we retry time() until it succeeds, and
log the failure so that performance problems related to this can be
identified.
*/
while
(
unlikely
(
time
(
t
)
==
((
time_t
)
-
1
)))
sql_print_information
(
"time() failed with %d"
,
errno
);
}
inline
time_t
query_start
()
{
query_start_used
=
1
;
return
start_time
;
}
inline
time_t
query_start
()
{
query_start_used
=
1
;
return
start_time
;
}
inline
void
set_time
()
{
if
(
user_time
)
start_time
=
time_after_lock
=
user_time
;
else
time_after_lock
=
time
(
&
start_time
);
}
inline
void
set_time
()
{
if
(
user_time
)
start_time
=
time_after_lock
=
user_time
;
else
{
safe_time
(
&
start_time
);
time_after_lock
=
start_time
;
}
}
inline
void
end_time
()
{
time
(
&
start_time
);
}
inline
void
end_time
()
{
safe_
time
(
&
start_time
);
}
inline
void
set_time
(
time_t
t
)
{
time_after_lock
=
start_time
=
user_time
=
t
;
}
inline
void
set_time
(
time_t
t
)
{
time_after_lock
=
start_time
=
user_time
=
t
;
}
inline
void
lock_time
()
{
time
(
&
time_after_lock
);
}
inline
void
lock_time
()
{
safe_
time
(
&
time_after_lock
);
}
inline
ulonglong
found_rows
(
void
)
inline
ulonglong
found_rows
(
void
)
{
{
return
limit_found_rows
;
return
limit_found_rows
;
...
...
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