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
9bbdb794
Commit
9bbdb794
authored
Jul 30, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
parents
789037d9
3a17ab45
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
7 deletions
+23
-7
mysql-test/r/auto_increment.result
mysql-test/r/auto_increment.result
+16
-2
mysql-test/t/auto_increment.test
mysql-test/t/auto_increment.test
+2
-0
sql/field.h
sql/field.h
+1
-1
sql/sql_base.cc
sql/sql_base.cc
+2
-2
sql/sql_list.h
sql/sql_list.h
+2
-2
No files found.
mysql-test/r/auto_increment.result
View file @
9bbdb794
...
@@ -201,12 +201,23 @@ a b
...
@@ -201,12 +201,23 @@ a b
202 5
202 5
203 6
203 6
204 7
204 7
alter table t1 modify b mediumint;
select * from t1 order by b;
a b
1 1
200 2
205 3
201 4
202 5
203 6
204 7
delete from t1 where a=0;
delete from t1 where a=0;
update t1 set a=0 where b=5;
update t1 set a=0 where b=5;
select * from t1 order by b;
select * from t1 order by b;
a b
a b
1 1
1 1
200 2
200 2
205 3
201 4
201 4
0 5
0 5
203 6
203 6
...
@@ -214,7 +225,7 @@ a b
...
@@ -214,7 +225,7 @@ a b
delete from t1 where a=0;
delete from t1 where a=0;
update t1 set a=NULL where b=6;
update t1 set a=NULL where b=6;
Warnings:
Warnings:
Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row
4
Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row
5
update t1 set a=300 where b=7;
update t1 set a=300 where b=7;
SET SQL_MODE='';
SET SQL_MODE='';
insert into t1(a,b)values(NULL,8);
insert into t1(a,b)values(NULL,8);
...
@@ -228,6 +239,7 @@ select * from t1 order by b;
...
@@ -228,6 +239,7 @@ select * from t1 order by b;
a b
a b
1 1
1 1
200 2
200 2
205 3
201 4
201 4
0 6
0 6
300 7
300 7
...
@@ -244,6 +256,7 @@ select * from t1 order by b;
...
@@ -244,6 +256,7 @@ select * from t1 order by b;
a b
a b
1 1
1 1
200 2
200 2
205 3
201 4
201 4
300 7
300 7
301 8
301 8
...
@@ -256,12 +269,13 @@ a b
...
@@ -256,12 +269,13 @@ a b
delete from t1 where a=0;
delete from t1 where a=0;
update t1 set a=NULL where b=13;
update t1 set a=NULL where b=13;
Warnings:
Warnings:
Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row
9
Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row
10
update t1 set a=500 where b=14;
update t1 set a=500 where b=14;
select * from t1 order by b;
select * from t1 order by b;
a b
a b
1 1
1 1
200 2
200 2
205 3
201 4
201 4
300 7
300 7
301 8
301 8
...
...
mysql-test/t/auto_increment.test
View file @
9bbdb794
...
@@ -138,6 +138,8 @@ insert into t1(b)values(5);
...
@@ -138,6 +138,8 @@ insert into t1(b)values(5);
insert
into
t1
(
b
)
values
(
6
);
insert
into
t1
(
b
)
values
(
6
);
insert
into
t1
(
b
)
values
(
7
);
insert
into
t1
(
b
)
values
(
7
);
select
*
from
t1
order
by
b
;
select
*
from
t1
order
by
b
;
alter
table
t1
modify
b
mediumint
;
select
*
from
t1
order
by
b
;
delete
from
t1
where
a
=
0
;
delete
from
t1
where
a
=
0
;
update
t1
set
a
=
0
where
b
=
5
;
update
t1
set
a
=
0
where
b
=
5
;
select
*
from
t1
order
by
b
;
select
*
from
t1
order
by
b
;
...
...
sql/field.h
View file @
9bbdb794
...
@@ -38,7 +38,7 @@ class Field
...
@@ -38,7 +38,7 @@ class Field
public:
public:
static
void
*
operator
new
(
size_t
size
)
{
return
(
void
*
)
sql_alloc
((
uint
)
size
);
}
static
void
*
operator
new
(
size_t
size
)
{
return
(
void
*
)
sql_alloc
((
uint
)
size
);
}
static
void
operator
delete
(
void
*
ptr_arg
,
size_t
size
)
{
static
void
operator
delete
(
void
*
ptr_arg
,
size_t
size
)
{
#ifdef
PEDANTIC_
SAFEMALLOC
#ifdef SAFEMALLOC
bfill
(
ptr_arg
,
size
,
0x8F
);
bfill
(
ptr_arg
,
size
,
0x8F
);
#endif
#endif
}
}
...
...
sql/sql_base.cc
View file @
9bbdb794
...
@@ -2587,7 +2587,7 @@ fill_record(List<Item> &fields,List<Item> &values, bool ignore_errors)
...
@@ -2587,7 +2587,7 @@ fill_record(List<Item> &fields,List<Item> &values, bool ignore_errors)
Field
*
rfield
=
field
->
field
;
Field
*
rfield
=
field
->
field
;
TABLE
*
table
=
rfield
->
table
;
TABLE
*
table
=
rfield
->
table
;
if
(
rfield
==
table
->
next_number_field
)
if
(
rfield
==
table
->
next_number_field
)
table
->
auto_increment_field_not_null
=
true
;
table
->
auto_increment_field_not_null
=
TRUE
;
if
((
value
->
save_in_field
(
rfield
,
0
)
<
0
)
&&
!
ignore_errors
)
if
((
value
->
save_in_field
(
rfield
,
0
)
<
0
)
&&
!
ignore_errors
)
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
}
}
...
@@ -2608,7 +2608,7 @@ fill_record(Field **ptr,List<Item> &values, bool ignore_errors)
...
@@ -2608,7 +2608,7 @@ fill_record(Field **ptr,List<Item> &values, bool ignore_errors)
value
=
v
++
;
value
=
v
++
;
TABLE
*
table
=
field
->
table
;
TABLE
*
table
=
field
->
table
;
if
(
field
==
table
->
next_number_field
)
if
(
field
==
table
->
next_number_field
)
table
->
auto_increment_field_not_null
=
true
;
table
->
auto_increment_field_not_null
=
TRUE
;
if
((
value
->
save_in_field
(
field
,
0
)
<
0
)
&&
!
ignore_errors
)
if
((
value
->
save_in_field
(
field
,
0
)
<
0
)
&&
!
ignore_errors
)
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
}
}
...
...
sql/sql_list.h
View file @
9bbdb794
...
@@ -19,9 +19,9 @@
...
@@ -19,9 +19,9 @@
#pragma interface
/* gcc class implementation */
#pragma interface
/* gcc class implementation */
#endif
#endif
/* mysql standard class memoryallocator */
/* mysql standard class memory
allocator */
#ifdef
PEDANTIC_
SAFEMALLOC
#ifdef SAFEMALLOC
#define TRASH(XX,YY) bfill((XX), (YY), 0x8F)
#define TRASH(XX,YY) bfill((XX), (YY), 0x8F)
#else
#else
#define TRASH(XX,YY)
/* no-op */
#define TRASH(XX,YY)
/* no-op */
...
...
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