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
02e46e82
Commit
02e46e82
authored
Jun 20, 2006
by
mikael@dator5.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#17138: Crash in stored procedure after fatal error that wasn't a real fatal error
parent
75f35861
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
sql/handler.h
sql/handler.h
+5
-3
sql/item_sum.cc
sql/item_sum.cc
+1
-2
sql/sql_select.cc
sql/sql_select.cc
+4
-5
No files found.
sql/handler.h
View file @
02e46e82
...
...
@@ -977,6 +977,9 @@ public:
ignorable than others. E.g. the partition handler can get inserts
into a range where there is no partition and this is an ignorable
error.
HA_ERR_FOUND_DUPP_UNIQUE is a special case in MyISAM that means the
same thing as HA_ERR_FOUND_DUPP_KEY but can in some cases lead to
a slightly different error message.
*/
#define HA_CHECK_DUPP_KEY 1
#define HA_CHECK_DUPP_UNIQUE 2
...
...
@@ -985,9 +988,8 @@ public:
{
if
(
!
error
||
((
flags
&
HA_CHECK_DUPP_KEY
)
&&
error
==
HA_ERR_FOUND_DUPP_KEY
)
||
((
flags
&
HA_CHECK_DUPP_UNIQUE
)
&&
error
==
HA_ERR_FOUND_DUPP_UNIQUE
))
(
error
==
HA_ERR_FOUND_DUPP_KEY
||
error
==
HA_ERR_FOUND_DUPP_UNIQUE
)))
return
FALSE
;
return
TRUE
;
}
...
...
sql/item_sum.cc
View file @
02e46e82
...
...
@@ -2663,8 +2663,7 @@ bool Item_sum_count_distinct::add()
return
tree
->
unique_add
(
table
->
record
[
0
]
+
table
->
s
->
null_bytes
);
}
if
((
error
=
table
->
file
->
ha_write_row
(
table
->
record
[
0
]))
&&
error
!=
HA_ERR_FOUND_DUPP_KEY
&&
error
!=
HA_ERR_FOUND_DUPP_UNIQUE
)
table
->
file
->
cannot_ignore_error
(
error
,
HA_CHECK_DUPP
))
return
TRUE
;
return
FALSE
;
}
...
...
sql/sql_select.cc
View file @
02e46e82
...
...
@@ -9354,9 +9354,9 @@ bool create_myisam_from_heap(THD *thd, TABLE *table, TMP_TABLE_PARAM *param,
/* copy row that filled HEAP table */
if
((
write_err
=
new_table
.
file
->
write_row
(
table
->
record
[
0
])))
{
if
(
write_err
!=
HA_ERR_FOUND_DUPP_KEY
&&
write_err
!=
HA_ERR_FOUND_DUPP_UNIQUE
||
!
ignore_last_dupp_key_error
)
goto
err
;
if
(
new_table
.
file
->
cannot_ignore_error
(
write_err
,
HA_CHECK_DUPP
)
||
!
ignore_last_dupp_key_error
)
goto
err
;
}
/* remove heap table and change to use myisam table */
...
...
@@ -10777,8 +10777,7 @@ end_write(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
join
->
found_records
++
;
if
((
error
=
table
->
file
->
write_row
(
table
->
record
[
0
])))
{
if
(
error
==
HA_ERR_FOUND_DUPP_KEY
||
error
==
HA_ERR_FOUND_DUPP_UNIQUE
)
if
(
table
->
file
->
cannot_ignore_error
(
error
,
HA_CHECK_DUPP
))
goto
end
;
if
(
create_myisam_from_heap
(
join
->
thd
,
table
,
&
join
->
tmp_table_param
,
error
,
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