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