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
0440e70a
Commit
0440e70a
authored
Jul 21, 2003
by
venu@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
undo one row warning instead use sql_warnings=1
parent
bc7cf303
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
mysql-test/r/warnings.result
mysql-test/r/warnings.result
+3
-0
mysql-test/t/warnings.test
mysql-test/t/warnings.test
+3
-0
sql/sql_insert.cc
sql/sql_insert.cc
+1
-3
No files found.
mysql-test/r/warnings.result
View file @
0440e70a
...
...
@@ -91,8 +91,11 @@ Warning 1263 Data truncated for column 'b' at row 3
Warning 1261 Data truncated, NULL supplied to NOT NULL column 'a' at row 4
Warning 1263 Data truncated for column 'b' at row 4
insert into t2(b) values('mysqlab');
set sql_warnings=1;
insert into t2(b) values('mysqlab');
Warnings:
Warning 1263 Data truncated for column 'b' at row 1
set sql_warnings=0;
drop table t1, t2;
create table t1(a char(10));
alter table t1 add b char;
...
...
mysql-test/t/warnings.test
View file @
0440e70a
...
...
@@ -52,6 +52,9 @@ update t1 set d=c;
create
table
t2
(
a
tinyint
NOT
NULL
,
b
char
(
3
));
insert
into
t2
select
b
,
c
from
t1
;
insert
into
t2
(
b
)
values
(
'mysqlab'
);
set
sql_warnings
=
1
;
insert
into
t2
(
b
)
values
(
'mysqlab'
);
set
sql_warnings
=
0
;
drop
table
t1
,
t2
;
#
...
...
sql/sql_insert.cc
View file @
0440e70a
...
...
@@ -231,9 +231,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list,
info
.
update_fields
=&
update_fields
;
info
.
update_values
=&
update_values
;
// Don't count warnings for simple inserts
if
((
thd
->
client_capabilities
&
CLIENT_PROTOCOL_41
)
||
values_list
.
elements
>
1
||
(
thd
->
options
&
OPTION_WARNINGS
))
if
(
values_list
.
elements
>
1
||
(
thd
->
options
&
OPTION_WARNINGS
))
thd
->
count_cuted_fields
=
1
;
thd
->
cuted_fields
=
0L
;
table
->
next_number_field
=
table
->
found_next_number_field
;
...
...
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