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
2f38a79a
Commit
2f38a79a
authored
Dec 16, 2004
by
jan@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for a CREATE TABLE...AUTO_INCREMENT = x in InnoDB.
parent
7216594f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
sql/ha_innodb.cc
sql/ha_innodb.cc
+5
-5
No files found.
sql/ha_innodb.cc
View file @
2f38a79a
...
@@ -4001,15 +4001,15 @@ ha_innobase::create(
...
@@ -4001,15 +4001,15 @@ ha_innobase::create(
DBUG_ASSERT
(
innobase_table
!=
0
);
DBUG_ASSERT
(
innobase_table
!=
0
);
if
(
thd
->
lex
->
sql_command
==
SQLCOM_ALTER_TABLE
&&
if
((
thd
->
lex
->
create_info
.
used_fields
&
HA_CREATE_USED_AUTO
)
&&
(
thd
->
lex
->
create_info
.
used_fields
&
HA_CREATE_USED_AUTO
)
&&
(
thd
->
lex
->
create_info
.
auto_increment_value
!=
0
))
{
(
thd
->
lex
->
create_info
.
auto_increment_value
!=
0
))
{
/* Query was ALTER TABLE...AUTO_INC = x; Find out a table
/* Query was ALTER TABLE...AUTO_INCREMENT = x; or
CREATE TABLE ...AUTO_INCREMENT = x; Find out a table
definition from the dictionary and get the current value
definition from the dictionary and get the current value
of the auto increment field. Set a new value to the
of the auto increment field. Set a new value to the
auto increment field if the
new value is creater than
auto increment field if the
value is greater than the
the current value
. */
maximum value in the column
. */
auto_inc_value
=
thd
->
lex
->
create_info
.
auto_increment_value
;
auto_inc_value
=
thd
->
lex
->
create_info
.
auto_increment_value
;
dict_table_autoinc_initialize
(
innobase_table
,
auto_inc_value
);
dict_table_autoinc_initialize
(
innobase_table
,
auto_inc_value
);
...
...
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