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
bf173a85
Commit
bf173a85
authored
Nov 24, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
send_warning removed
parent
ab432257
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
37 deletions
+10
-37
sql/protocol.cc
sql/protocol.cc
+0
-30
sql/sql_class.cc
sql/sql_class.cc
+2
-1
sql/sql_parse.cc
sql/sql_parse.cc
+8
-6
No files found.
sql/protocol.cc
View file @
bf173a85
...
@@ -131,36 +131,6 @@ void net_send_error(THD *thd, uint sql_errno, const char *err)
...
@@ -131,36 +131,6 @@ void net_send_error(THD *thd, uint sql_errno, const char *err)
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
/*
Send a warning to the end user
SYNOPSIS
send_warning()
thd Thread handler
sql_errno Warning number (error message)
err Error string. If not set, use ER(sql_errno)
DESCRIPTION
Register the warning so that the user can get it with mysql_warnings()
Send an ok (+ warning count) to the end user.
*/
void
send_warning
(
THD
*
thd
,
uint
sql_errno
,
const
char
*
err
)
{
DBUG_ENTER
(
"send_warning"
);
if
(
thd
->
spcont
&&
thd
->
spcont
->
find_handler
(
sql_errno
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
))
{
DBUG_VOID_RETURN
;
}
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
sql_errno
,
err
?
err
:
ER
(
sql_errno
));
send_ok
(
thd
);
DBUG_VOID_RETURN
;
}
/*
/*
Write error package and flush to client
Write error package and flush to client
It's a little too low level, but I don't want to use another buffer for
It's a little too low level, but I don't want to use another buffer for
...
...
sql/sql_class.cc
View file @
bf173a85
...
@@ -1754,7 +1754,8 @@ bool select_dumpvar::send_data(List<Item> &items)
...
@@ -1754,7 +1754,8 @@ bool select_dumpvar::send_data(List<Item> &items)
bool
select_dumpvar
::
send_eof
()
bool
select_dumpvar
::
send_eof
()
{
{
if
(
!
row_count
)
if
(
!
row_count
)
send_warning
(
thd
,
ER_SP_FETCH_NO_DATA
);
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_SP_FETCH_NO_DATA
,
ER
(
ER_SP_FETCH_NO_DATA
));
::
send_ok
(
thd
,
row_count
);
::
send_ok
(
thd
,
row_count
);
return
0
;
return
0
;
}
}
...
...
sql/sql_parse.cc
View file @
bf173a85
...
@@ -3579,9 +3579,10 @@ mysql_execute_command(THD *thd)
...
@@ -3579,9 +3579,10 @@ mysql_execute_command(THD *thd)
message in the error log, so we don't send it.
message in the error log, so we don't send it.
*/
*/
if
((
thd
->
options
&
OPTION_STATUS_NO_TRANS_UPDATE
)
&&
!
thd
->
slave_thread
)
if
((
thd
->
options
&
OPTION_STATUS_NO_TRANS_UPDATE
)
&&
!
thd
->
slave_thread
)
send_warning
(
thd
,
ER_WARNING_NOT_COMPLETE_ROLLBACK
,
0
);
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
else
ER_WARNING_NOT_COMPLETE_ROLLBACK
,
send_ok
(
thd
);
ER
(
ER_WARNING_NOT_COMPLETE_ROLLBACK
));
send_ok
(
thd
);
}
}
else
else
res
=
TRUE
;
res
=
TRUE
;
...
@@ -3591,9 +3592,10 @@ mysql_execute_command(THD *thd)
...
@@ -3591,9 +3592,10 @@ mysql_execute_command(THD *thd)
if
(
!
ha_rollback_to_savepoint
(
thd
,
lex
->
savepoint_name
))
if
(
!
ha_rollback_to_savepoint
(
thd
,
lex
->
savepoint_name
))
{
{
if
((
thd
->
options
&
OPTION_STATUS_NO_TRANS_UPDATE
)
&&
!
thd
->
slave_thread
)
if
((
thd
->
options
&
OPTION_STATUS_NO_TRANS_UPDATE
)
&&
!
thd
->
slave_thread
)
send_warning
(
thd
,
ER_WARNING_NOT_COMPLETE_ROLLBACK
,
0
);
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
else
ER_WARNING_NOT_COMPLETE_ROLLBACK
,
send_ok
(
thd
);
ER
(
ER_WARNING_NOT_COMPLETE_ROLLBACK
));
send_ok
(
thd
);
}
}
else
else
goto
error
;
goto
error
;
...
...
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