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
17c51178
Commit
17c51178
authored
Jan 11, 2008
by
gshchepa/uchum@host.loc
Browse files
Options
Browse Files
Download
Plain Diff
Merge host.loc:/home/uchum/work/5.1-opt-33699
into host.loc:/home/uchum/work/5.1-opt
parents
0ef58cfe
32d13ab2
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
40 additions
and
53 deletions
+40
-53
mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test
mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test
+1
-1
mysql-test/include/ps_modify.inc
mysql-test/include/ps_modify.inc
+1
-0
mysql-test/r/auto_increment.result
mysql-test/r/auto_increment.result
+6
-6
mysql-test/r/null.result
mysql-test/r/null.result
+3
-5
mysql-test/r/ps_2myisam.result
mysql-test/r/ps_2myisam.result
+2
-3
mysql-test/r/ps_3innodb.result
mysql-test/r/ps_3innodb.result
+2
-3
mysql-test/r/ps_4heap.result
mysql-test/r/ps_4heap.result
+2
-3
mysql-test/r/ps_5merge.result
mysql-test/r/ps_5merge.result
+4
-6
mysql-test/r/warnings.result
mysql-test/r/warnings.result
+1
-2
mysql-test/suite/ndb/r/ps_7ndb.result
mysql-test/suite/ndb/r/ps_7ndb.result
+2
-3
mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result
mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result
+3
-9
mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result
mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result
+3
-9
mysql-test/suite/rpl/t/rpl_err_ignoredtable.test
mysql-test/suite/rpl/t/rpl_err_ignoredtable.test
+1
-1
mysql-test/t/auto_increment.test
mysql-test/t/auto_increment.test
+2
-0
mysql-test/t/null.test
mysql-test/t/null.test
+2
-0
mysql-test/t/warnings.test
mysql-test/t/warnings.test
+1
-0
sql/sql_update.cc
sql/sql_update.cc
+3
-1
tests/mysql_client_test.c
tests/mysql_client_test.c
+1
-1
No files found.
mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test
View file @
17c51178
...
...
@@ -419,7 +419,7 @@ connection master;
update
t31
set
f5
=
555555555555555
where
f3
=
6
;
update
t31
set
f2
=
2
where
f3
=
2
;
update
t31
set
f1
=
NULL
where
f3
=
1
;
update
t31
set
f3
=
NULL
,
f27
=
NULL
,
f35
=
'f35 new value'
where
f3
=
3
;
update
t31
set
f3
=
0
,
f27
=
NULL
,
f35
=
'f35 new value'
where
f3
=
3
;
--
echo
--
echo
**
Delete
from
Master
**
...
...
mysql-test/include/ps_modify.inc
View file @
17c51178
...
...
@@ -108,6 +108,7 @@ execute stmt1 using @arg00, @arg01;
select
a
,
b
from
t1
where
a
=@
arg00
;
set
@
arg00
=
NULL
;
set
@
arg01
=
2
;
--
error
1048
execute
stmt1
using
@
arg00
,
@
arg01
;
select
a
,
b
from
t1
order
by
a
;
set
@
arg00
=
0
;
...
...
mysql-test/r/auto_increment.result
View file @
17c51178
...
...
@@ -231,8 +231,7 @@ a b
204 7
delete from t1 where a=0;
update t1 set a=NULL where b=6;
Warnings:
Warning 1048 Column 'a' cannot be null
ERROR 23000: Column 'a' cannot be null
update t1 set a=300 where b=7;
SET SQL_MODE='';
insert into t1(a,b)values(NULL,8);
...
...
@@ -247,7 +246,7 @@ a b
1 1
200 2
201 4
0
6
203
6
300 7
301 8
400 9
...
...
@@ -263,6 +262,7 @@ a b
1 1
200 2
201 4
203 6
300 7
301 8
400 9
...
...
@@ -273,20 +273,20 @@ a b
405 14
delete from t1 where a=0;
update t1 set a=NULL where b=13;
Warnings:
Warning 1048 Column 'a' cannot be null
ERROR 23000: Column 'a' cannot be null
update t1 set a=500 where b=14;
select * from t1 order by b;
a b
1 1
200 2
201 4
203 6
300 7
301 8
400 9
401 10
402 11
0
13
404
13
500 14
drop table t1;
create table t1 (a bigint);
...
...
mysql-test/r/null.result
View file @
17c51178
...
...
@@ -93,11 +93,9 @@ INSERT INTO t1 SET a = "", d= "2003-01-14 03:54:55";
Warnings:
Warning 1265 Data truncated for column 'd' at row 1
UPDATE t1 SET d=1/NULL;
Warnings:
Warning 1265 Data truncated for column 'd' at row 1
ERROR 23000: Column 'd' cannot be null
UPDATE t1 SET d=NULL;
Warnings:
Warning 1048 Column 'd' cannot be null
ERROR 23000: Column 'd' cannot be null
INSERT INTO t1 (a) values (null);
ERROR 23000: Column 'a' cannot be null
INSERT INTO t1 (a) values (1/null);
...
...
@@ -132,7 +130,7 @@ Warning 1048 Column 'd' cannot be null
Warning 1048 Column 'd' cannot be null
select * from t1;
a b c d
0 0000-00-00 00:00:00
0
0 0000-00-00 00:00:00
2003
0 0000-00-00 00:00:00 0
0 0000-00-00 00:00:00 0
0 0000-00-00 00:00:00 0
...
...
mysql-test/r/ps_2myisam.result
View file @
17c51178
...
...
@@ -1303,12 +1303,11 @@ a b
set @arg00=NULL;
set @arg01=2;
execute stmt1 using @arg00, @arg01;
Warnings:
Warning 1048 Column 'a' cannot be null
ERROR 23000: Column 'a' cannot be null
select a,b from t1 order by a;
a b
0 two
1 one
2 two
3 three
4 four
set @arg00=0;
...
...
mysql-test/r/ps_3innodb.result
View file @
17c51178
...
...
@@ -1286,12 +1286,11 @@ a b
set @arg00=NULL;
set @arg01=2;
execute stmt1 using @arg00, @arg01;
Warnings:
Warning 1048 Column 'a' cannot be null
ERROR 23000: Column 'a' cannot be null
select a,b from t1 order by a;
a b
0 two
1 one
2 two
3 three
4 four
set @arg00=0;
...
...
mysql-test/r/ps_4heap.result
View file @
17c51178
...
...
@@ -1287,12 +1287,11 @@ a b
set @arg00=NULL;
set @arg01=2;
execute stmt1 using @arg00, @arg01;
Warnings:
Warning 1048 Column 'a' cannot be null
ERROR 23000: Column 'a' cannot be null
select a,b from t1 order by a;
a b
0 two
1 one
2 two
3 three
4 four
set @arg00=0;
...
...
mysql-test/r/ps_5merge.result
View file @
17c51178
...
...
@@ -1329,12 +1329,11 @@ a b
set @arg00=NULL;
set @arg01=2;
execute stmt1 using @arg00, @arg01;
Warnings:
Warning 1048 Column 'a' cannot be null
ERROR 23000: Column 'a' cannot be null
select a,b from t1 order by a;
a b
0 two
1 one
2 two
3 three
4 four
set @arg00=0;
...
...
@@ -4351,12 +4350,11 @@ a b
set @arg00=NULL;
set @arg01=2;
execute stmt1 using @arg00, @arg01;
Warnings:
Warning 1048 Column 'a' cannot be null
ERROR 23000: Column 'a' cannot be null
select a,b from t1 order by a;
a b
0 two
1 one
2 two
3 three
4 four
set @arg00=0;
...
...
mysql-test/r/warnings.result
View file @
17c51178
...
...
@@ -98,8 +98,7 @@ Warning 1265 Data truncated for column 'c' at row 1
Warning 1265 Data truncated for column 'c' at row 2
alter table t1 add d char(2);
update t1 set a=NULL where a=10;
Warnings:
Warning 1048 Column 'a' cannot be null
ERROR 23000: Column 'a' cannot be null
update t1 set c='mysql ab' where c='test';
Warnings:
Warning 1265 Data truncated for column 'c' at row 4
...
...
mysql-test/suite/ndb/r/ps_7ndb.result
View file @
17c51178
...
...
@@ -1286,12 +1286,11 @@ a b
set @arg00=NULL;
set @arg01=2;
execute stmt1 using @arg00, @arg01;
Warnings:
Warning 1048 Column 'a' cannot be null
ERROR 23000: Column 'a' cannot be null
select a,b from t1 order by a;
a b
0 two
1 one
2 two
3 three
4 four
set @arg00=0;
...
...
mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result
View file @
17c51178
...
...
@@ -454,9 +454,7 @@ f1 f2 f3 f4
update t31 set f5=555555555555555 where f3=6;
update t31 set f2=2 where f3=2;
update t31 set f1=NULL where f3=1;
update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
Warnings:
Warning 1048 Column 'f3' cannot be null
update t31 set f3=0, f27=NULL, f35='f35 new value' where f3=3;
** Delete from Master **
...
...
@@ -1595,9 +1593,7 @@ f1 f2 f3 f4
update t31 set f5=555555555555555 where f3=6;
update t31 set f2=2 where f3=2;
update t31 set f1=NULL where f3=1;
update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
Warnings:
Warning 1048 Column 'f3' cannot be null
update t31 set f3=0, f27=NULL, f35='f35 new value' where f3=3;
** Delete from Master **
...
...
@@ -2736,9 +2732,7 @@ f1 f2 f3 f4
update t31 set f5=555555555555555 where f3=6;
update t31 set f2=2 where f3=2;
update t31 set f1=NULL where f3=1;
update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
Warnings:
Warning 1048 Column 'f3' cannot be null
update t31 set f3=0, f27=NULL, f35='f35 new value' where f3=3;
** Delete from Master **
...
...
mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result
View file @
17c51178
...
...
@@ -454,9 +454,7 @@ f1 f2 f3 f4
update t31 set f5=555555555555555 where f3=6;
update t31 set f2=2 where f3=2;
update t31 set f1=NULL where f3=1;
update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
Warnings:
Warning 1048 Column 'f3' cannot be null
update t31 set f3=0, f27=NULL, f35='f35 new value' where f3=3;
** Delete from Master **
...
...
@@ -1595,9 +1593,7 @@ f1 f2 f3 f4
update t31 set f5=555555555555555 where f3=6;
update t31 set f2=2 where f3=2;
update t31 set f1=NULL where f3=1;
update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
Warnings:
Warning 1048 Column 'f3' cannot be null
update t31 set f3=0, f27=NULL, f35='f35 new value' where f3=3;
** Delete from Master **
...
...
@@ -2736,9 +2732,7 @@ f1 f2 f3 f4
update t31 set f5=555555555555555 where f3=6;
update t31 set f2=2 where f3=2;
update t31 set f1=NULL where f3=1;
update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
Warnings:
Warning 1048 Column 'f3' cannot be null
update t31 set f3=0, f27=NULL, f35='f35 new value' where f3=3;
** Delete from Master **
...
...
mysql-test/suite/rpl/t/rpl_err_ignoredtable.test
View file @
17c51178
...
...
@@ -49,7 +49,7 @@ kill @id;
drop
table
t2
,
t3
;
insert
into
t4
values
(
3
),(
4
);
connection
master
;
--
error
0
,
1053
,
2013
--
error
0
,
1053
,
2013
,
1048
reap
;
connection
master1
;
save_master_pos
;
...
...
mysql-test/t/auto_increment.test
View file @
17c51178
...
...
@@ -149,6 +149,7 @@ delete from t1 where a=0;
update
t1
set
a
=
0
where
b
=
5
;
select
*
from
t1
order
by
b
;
delete
from
t1
where
a
=
0
;
--
error
1048
update
t1
set
a
=
NULL
where
b
=
6
;
update
t1
set
a
=
300
where
b
=
7
;
SET
SQL_MODE
=
''
;
...
...
@@ -164,6 +165,7 @@ delete from t1 where a=0;
update
t1
set
a
=
0
where
b
=
12
;
select
*
from
t1
order
by
b
;
delete
from
t1
where
a
=
0
;
--
error
1048
update
t1
set
a
=
NULL
where
b
=
13
;
update
t1
set
a
=
500
where
b
=
14
;
select
*
from
t1
order
by
b
;
...
...
mysql-test/t/null.test
View file @
17c51178
...
...
@@ -61,7 +61,9 @@ drop table t1;
#
CREATE
TABLE
t1
(
a
varchar
(
16
)
NOT
NULL
default
''
,
b
smallint
(
6
)
NOT
NULL
default
0
,
c
datetime
NOT
NULL
default
'0000-00-00 00:00:00'
,
d
smallint
(
6
)
NOT
NULL
default
0
);
INSERT
INTO
t1
SET
a
=
""
,
d
=
"2003-01-14 03:54:55"
;
--
error
1048
UPDATE
t1
SET
d
=
1
/
NULL
;
--
error
1048
UPDATE
t1
SET
d
=
NULL
;
--
error
1048
INSERT
INTO
t1
(
a
)
values
(
null
);
...
...
mysql-test/t/warnings.test
View file @
17c51178
...
...
@@ -65,6 +65,7 @@ create table t1(a tinyint NOT NULL, b tinyint unsigned, c char(5));
insert
into
t1
values
(
NULL
,
100
,
'mysql'
),(
10
,
-
1
,
'mysql ab'
),(
500
,
256
,
'open source'
),(
20
,
NULL
,
'test'
);
alter
table
t1
modify
c
char
(
4
);
alter
table
t1
add
d
char
(
2
);
--
error
1048
update
t1
set
a
=
NULL
where
a
=
10
;
update
t1
set
c
=
'mysql ab'
where
c
=
'test'
;
update
t1
set
d
=
c
;
...
...
sql/sql_update.cc
View file @
17c51178
...
...
@@ -526,7 +526,9 @@ int mysql_update(THD *thd,
init_read_record
(
&
info
,
thd
,
table
,
select
,
0
,
1
);
updated
=
found
=
0
;
thd
->
count_cuted_fields
=
CHECK_FIELD_WARN
;
/* calc cuted fields */
/* Generate an error when trying to set a NOT NULL field to NULL. */
thd
->
count_cuted_fields
=
ignore
?
CHECK_FIELD_WARN
:
CHECK_FIELD_ERROR_FOR_NULL
;
thd
->
cuted_fields
=
0L
;
thd
->
proc_info
=
"Updating"
;
...
...
tests/mysql_client_test.c
View file @
17c51178
...
...
@@ -15674,7 +15674,7 @@ static void test_mysql_insert_id()
myquery
(
rc
);
res
=
mysql_insert_id
(
mysql
);
DIE_UNLESS
(
res
==
0
);
rc
=
mysql_query
(
mysql
,
"update t2 set f1=
NULL
where f1=14"
);
rc
=
mysql_query
(
mysql
,
"update t2 set f1=
0
where f1=14"
);
myquery
(
rc
);
res
=
mysql_insert_id
(
mysql
);
DIE_UNLESS
(
res
==
0
);
...
...
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