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
5107f6b9
Commit
5107f6b9
authored
Feb 11, 2010
by
Georgi Kodinov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Addendum to bug #46175 : use and check for the correct error values
when converting to a enumerated type.
parent
0ee625fa
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
sql/item.cc
sql/item.cc
+1
-1
sql/sql_select.h
sql/sql_select.h
+5
-4
No files found.
sql/item.cc
View file @
5107f6b9
...
...
@@ -5157,7 +5157,7 @@ int Item::save_in_field(Field *field, bool no_conversions)
field
->
set_notnull
();
error
=
field
->
store
(
nr
,
unsigned_flag
);
}
return
error
?
error
:
(
field
->
table
->
in_use
->
is_error
()
?
2
:
0
);
return
error
?
error
:
(
field
->
table
->
in_use
->
is_error
()
?
1
:
0
);
}
...
...
sql/sql_select.h
View file @
5107f6b9
...
...
@@ -736,10 +736,11 @@ public:
we need to check for errors executing it and react accordingly
*/
if
(
!
res
&&
table
->
in_use
->
is_error
())
res
=
2
;
res
=
1
;
/* STORE_KEY_FATAL */
dbug_tmp_restore_column_map
(
table
->
write_set
,
old_map
);
null_key
=
to_field
->
is_null
()
||
item
->
null_value
;
return
(
err
!=
0
||
res
>
2
?
STORE_KEY_FATAL
:
(
store_key_result
)
res
);
return
((
err
!=
0
||
res
<
0
||
res
>
2
)
?
STORE_KEY_FATAL
:
(
store_key_result
)
res
);
}
};
...
...
@@ -775,10 +776,10 @@ protected:
we need to check for errors executing it and react accordingly
*/
if
(
!
err
&&
to_field
->
table
->
in_use
->
is_error
())
err
=
2
;
err
=
1
;
/* STORE_KEY_FATAL */
}
null_key
=
to_field
->
is_null
()
||
item
->
null_value
;
return
(
err
>
2
?
STORE_KEY_FATAL
:
(
store_key_result
)
err
);
return
(
(
err
<
0
||
err
>
2
)
?
STORE_KEY_FATAL
:
(
store_key_result
)
err
);
}
};
...
...
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