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
ec38c1bb
Commit
ec38c1bb
authored
Nov 28, 2011
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small cleanup
parent
b27d93f3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
47 deletions
+19
-47
mysys/my_handler_errors.h
mysys/my_handler_errors.h
+0
-3
sql/mysqld.cc
sql/mysqld.cc
+2
-9
sql/sql_class.cc
sql/sql_class.cc
+1
-9
sql/sql_class.h
sql/sql_class.h
+12
-0
sql/sql_connect.cc
sql/sql_connect.cc
+3
-18
sql/sql_parse.cc
sql/sql_parse.cc
+1
-8
No files found.
mysys/my_handler_errors.h
View file @
ec38c1bb
...
...
@@ -88,7 +88,4 @@ static const char *handler_error_messages[]=
"Disk full"
};
extern
void
my_handler_error_register
(
void
);
extern
void
my_handler_error_unregister
(
void
);
#endif
/* MYSYS_MY_HANDLER_ERRORS_INCLUDED */
sql/mysqld.cc
View file @
ec38c1bb
...
...
@@ -2340,15 +2340,8 @@ void close_connection(THD *thd, uint sql_errno)
if
(
sql_errno
)
net_send_error
(
thd
,
sql_errno
,
ER_DEFAULT
(
sql_errno
),
NULL
);
if
(
global_system_variables
.
log_warnings
>
3
)
{
Security_context
*
sctx
=
&
thd
->
main_security_ctx
;
sql_print_warning
(
ER
(
ER_NEW_ABORTING_CONNECTION
),
thd
->
thread_id
,(
thd
->
db
?
thd
->
db
:
"unconnected"
),
sctx
->
user
?
sctx
->
user
:
"unauthenticated"
,
sctx
->
host_or_ip
,
(
sql_errno
?
ER
(
sql_errno
)
:
"CLOSE_CONNECTION"
));
}
thd
->
print_aborted_warning
(
3
,
sql_errno
?
ER_DEFAULT
(
sql_errno
)
:
"CLOSE_CONNECTION"
);
thd
->
disconnect
();
...
...
sql/sql_class.cc
View file @
ec38c1bb
...
...
@@ -1528,15 +1528,7 @@ void THD::awake(killed_state state_to_set)
THD_CHECK_SENTRY
(
this
);
mysql_mutex_assert_owner
(
&
LOCK_thd_data
);
if
(
global_system_variables
.
log_warnings
>
3
)
{
Security_context
*
sctx
=
security_ctx
;
sql_print_warning
(
ER
(
ER_NEW_ABORTING_CONNECTION
),
thread_id
,(
db
?
db
:
"unconnected"
),
sctx
->
user
?
sctx
->
user
:
"unauthenticated"
,
sctx
->
host_or_ip
,
"KILLED"
);
}
print_aborted_warning
(
3
,
"KILLED"
);
/* Set the 'killed' flag of 'this', which is the target THD object. */
killed
=
state_to_set
;
...
...
sql/sql_class.h
View file @
ec38c1bb
...
...
@@ -2987,6 +2987,18 @@ class THD :public Statement,
LEX_STRING
get_invoker_host
()
{
return
invoker_host
;
}
bool
has_invoker
()
{
return
invoker_user
.
length
>
0
;
}
void
print_aborted_warning
(
uint
threshold
,
const
char
*
reason
)
{
if
(
global_system_variables
.
log_warnings
>
threshold
)
{
Security_context
*
sctx
=
&
main_security_ctx
;
sql_print_warning
(
ER
(
ER_NEW_ABORTING_CONNECTION
),
thread_id
,
(
db
?
db
:
"unconnected"
),
sctx
->
user
?
sctx
->
user
:
"unauthenticated"
,
sctx
->
host_or_ip
,
reason
);
}
}
private
:
/*
This reference points to the table arena when the expression
...
...
sql/sql_connect.cc
View file @
ec38c1bb
...
...
@@ -1072,20 +1072,8 @@ void end_connection(THD *thd)
status_var_increment
(
thd
->
status_var
.
lost_connections
);
}
if
(
net
->
error
&&
net
->
vio
!=
0
)
{
if
(
!
thd
->
killed
&&
thd
->
variables
.
log_warnings
>
1
)
{
Security_context
*
sctx
=
thd
->
security_ctx
;
sql_print_warning
(
ER
(
ER_NEW_ABORTING_CONNECTION
),
thd
->
thread_id
,(
thd
->
db
?
thd
->
db
:
"unconnected"
),
sctx
->
user
?
sctx
->
user
:
"unauthenticated"
,
sctx
->
host_or_ip
,
(
thd
->
stmt_da
->
is_error
()
?
thd
->
stmt_da
->
message
()
:
ER
(
ER_UNKNOWN_ERROR
)));
}
}
if
(
!
thd
->
killed
&&
(
net
->
error
&&
net
->
vio
!=
0
))
thd
->
print_aborted_warning
(
1
,
ER
(
ER_UNKNOWN_ERROR
));
}
...
...
@@ -1116,10 +1104,7 @@ void prepare_new_connection_state(THD* thd)
if
(
thd
->
is_error
())
{
thd
->
killed
=
KILL_CONNECTION
;
sql_print_warning
(
ER
(
ER_NEW_ABORTING_CONNECTION
),
thd
->
thread_id
,(
thd
->
db
?
thd
->
db
:
"unconnected"
),
sctx
->
user
?
sctx
->
user
:
"unauthenticated"
,
sctx
->
host_or_ip
,
"init_connect command failed"
);
thd
->
print_aborted_warning
(
0
,
"init_connect command failed"
);
sql_print_warning
(
"%s"
,
thd
->
stmt_da
->
message
());
}
thd
->
proc_info
=
0
;
...
...
sql/sql_parse.cc
View file @
ec38c1bb
...
...
@@ -3751,14 +3751,7 @@ case SQLCOM_PREPARE:
if
(
tx_release
)
{
thd
->
killed
=
KILL_CONNECTION
;
if
(
global_system_variables
.
log_warnings
>
3
)
{
Security_context
*
sctx
=
&
thd
->
main_security_ctx
;
sql_print_warning
(
ER
(
ER_NEW_ABORTING_CONNECTION
),
thd
->
thread_id
,(
thd
->
db
?
thd
->
db
:
"unconnected"
),
sctx
->
user
?
sctx
->
user
:
"unauthenticated"
,
sctx
->
host_or_ip
,
"RELEASE"
);
}
thd
->
print_aborted_warning
(
3
,
"RELEASE"
);
}
my_ok
(
thd
);
break
;
...
...
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