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
251fe25b
Commit
251fe25b
authored
Sep 16, 2004
by
mskold@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimzed handling of NO_AUTO_VALUE_ON_ZERO
parent
9cf83855
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+5
-6
No files found.
sql/ha_ndbcluster.cc
View file @
251fe25b
...
@@ -1526,11 +1526,6 @@ int ha_ndbcluster::write_row(byte *record)
...
@@ -1526,11 +1526,6 @@ int ha_ndbcluster::write_row(byte *record)
if
(
table
->
timestamp_default_now
)
if
(
table
->
timestamp_default_now
)
update_timestamp
(
record
+
table
->
timestamp_default_now
-
1
);
update_timestamp
(
record
+
table
->
timestamp_default_now
-
1
);
has_auto_increment
=
(
table
->
next_number_field
&&
record
==
table
->
record
[
0
]);
has_auto_increment
=
(
table
->
next_number_field
&&
record
==
table
->
record
[
0
]);
skip_auto_increment
=
table
->
next_number_field
&&
table
->
next_number_field
->
val_int
()
!=
0
||
table
->
auto_increment_field_not_null
&&
current_thd
->
variables
.
sql_mode
&
MODE_NO_AUTO_VALUE_ON_ZERO
;
if
(
!
(
op
=
trans
->
getNdbOperation
((
const
NDBTAB
*
)
m_table
)))
if
(
!
(
op
=
trans
->
getNdbOperation
((
const
NDBTAB
*
)
m_table
)))
ERR_RETURN
(
trans
->
getNdbError
());
ERR_RETURN
(
trans
->
getNdbError
());
...
@@ -1551,7 +1546,11 @@ int ha_ndbcluster::write_row(byte *record)
...
@@ -1551,7 +1546,11 @@ int ha_ndbcluster::write_row(byte *record)
int
res
;
int
res
;
if
(
has_auto_increment
)
if
(
has_auto_increment
)
{
skip_auto_increment
=
false
;
update_auto_increment
();
update_auto_increment
();
skip_auto_increment
=
!
auto_increment_column_changed
;
}
if
((
res
=
set_primary_key
(
op
)))
if
((
res
=
set_primary_key
(
op
)))
return
res
;
return
res
;
...
...
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