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
8f75260b
Commit
8f75260b
authored
Aug 21, 2009
by
Martin Hansson
Browse files
Options
Browse Files
Download
Plain Diff
Merge.
parents
06655369
e66fba53
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
0 deletions
+31
-0
mysql-test/r/auto_increment.result
mysql-test/r/auto_increment.result
+14
-0
mysql-test/t/auto_increment.test
mysql-test/t/auto_increment.test
+16
-0
sql/sql_update.cc
sql/sql_update.cc
+1
-0
No files found.
mysql-test/r/auto_increment.result
View file @
8f75260b
...
...
@@ -440,3 +440,17 @@ a val
2 1
3 1
drop table t1;
#
# Bug#46616: Assertion `!table->auto_increment_field_not_null' on view
# manipulations
#
CREATE TABLE t1 ( a INT );
INSERT INTO t1 VALUES (1), (1);
CREATE TABLE t2 ( a INT AUTO_INCREMENT KEY );
CREATE TABLE IF NOT EXISTS t2 AS SELECT a FROM t1;
ERROR 23000: Duplicate entry '1' for key 1
UPDATE t2 SET a = 2;
SELECT a FROM t2;
a
2
DROP TABLE t1, t2;
mysql-test/t/auto_increment.test
View file @
8f75260b
...
...
@@ -292,3 +292,19 @@ update t1 set a=2 where a=1;
insert
into
t1
(
val
)
values
(
1
);
select
*
from
t1
;
drop
table
t1
;
--
echo
#
--
echo
# Bug#46616: Assertion `!table->auto_increment_field_not_null' on view
--
echo
# manipulations
--
echo
#
CREATE
TABLE
t1
(
a
INT
);
INSERT
INTO
t1
VALUES
(
1
),
(
1
);
CREATE
TABLE
t2
(
a
INT
AUTO_INCREMENT
KEY
);
--
error
ER_DUP_ENTRY
CREATE
TABLE
IF
NOT
EXISTS
t2
AS
SELECT
a
FROM
t1
;
UPDATE
t2
SET
a
=
2
;
SELECT
a
FROM
t2
;
DROP
TABLE
t1
,
t2
;
sql/sql_update.cc
View file @
8f75260b
...
...
@@ -527,6 +527,7 @@ int mysql_update(THD *thd,
table
->
file
->
unlock_row
();
thd
->
row_count
++
;
}
table
->
auto_increment_field_not_null
=
FALSE
;
/*
Caching the killed status to pass as the arg to query event constuctor;
The cached value can not change whereas the killed status can
...
...
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