summaryrefslogtreecommitdiff
path: root/sql/ha_heap.cc
diff options
context:
space:
mode:
authorunknown <acurtis/antony@xiphis.org/ltantony.xiphis.org>2006-08-30 13:20:39 -0700
committerunknown <acurtis/antony@xiphis.org/ltantony.xiphis.org>2006-08-30 13:20:39 -0700
commit2233201ba715bb733af86cddd1305ee389897d4b (patch)
tree8420b990a80a44f9a16ab6d77359c0a179d2893a /sql/ha_heap.cc
parent69a29c1ea143387588367afbc3121fce4d977415 (diff)
downloadmariadb-git-2233201ba715bb733af86cddd1305ee389897d4b.tar.gz
Bug#20573
"strict mode: inserts autogenerated auto_increment value bigger than max" Strict mode should fail if autoincrement value is out of range include/my_base.h: Add new handler error codes sql/ha_berkeley.cc: handle error in update_auto_increment() sql/ha_heap.cc: handle error in update_auto_increment() sql/ha_innodb.cc: handle error in update_auto_increment() sql/ha_myisam.cc: handle error in update_auto_increment() sql/ha_myisammrg.cc: handle error in update_auto_increment() sql/ha_ndbcluster.cc: handle error in update_auto_increment() sql/handler.cc: return error from handler::update_auto_increment() sql/handler.h: change return type of handler::update_auto_increment() to int sql/share/errmsg.txt: new error message for auto-increment mysql-test/include/strict_autoinc.inc: New BitKeeper file ``mysql-test/include/strict_autoinc.inc'' mysql-test/r/strict_autoinc_1myisam.result: New BitKeeper file ``mysql-test/r/strict_autoinc_1myisam.result'' mysql-test/r/strict_autoinc_2innodb.result: New BitKeeper file ``mysql-test/r/strict_autoinc_2innodb.result'' mysql-test/r/strict_autoinc_3heap.result: New BitKeeper file ``mysql-test/r/strict_autoinc_3heap.result'' mysql-test/r/strict_autoinc_4bdb.result: New BitKeeper file ``mysql-test/r/strict_autoinc_4bdb.result'' mysql-test/r/strict_autoinc_5ndb.result: New BitKeeper file ``mysql-test/r/strict_autoinc_5ndb.result'' mysql-test/t/strict_autoinc_1myisam.test: New BitKeeper file ``mysql-test/t/strict_autoinc_1myisam.test'' mysql-test/t/strict_autoinc_2innodb.test: New BitKeeper file ``mysql-test/t/strict_autoinc_2innodb.test'' mysql-test/t/strict_autoinc_3heap.test: New BitKeeper file ``mysql-test/t/strict_autoinc_3heap.test'' mysql-test/t/strict_autoinc_4bdb.test: New BitKeeper file ``mysql-test/t/strict_autoinc_4bdb.test'' mysql-test/t/strict_autoinc_5ndb.test: New BitKeeper file ``mysql-test/t/strict_autoinc_5ndb.test''
Diffstat (limited to 'sql/ha_heap.cc')
-rw-r--r--sql/ha_heap.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/ha_heap.cc b/sql/ha_heap.cc
index 79d4575ff1b..3aaa0287098 100644
--- a/sql/ha_heap.cc
+++ b/sql/ha_heap.cc
@@ -176,7 +176,10 @@ int ha_heap::write_row(byte * buf)
if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT)
table->timestamp_field->set_time();
if (table->next_number_field && buf == table->record[0])
- update_auto_increment();
+ {
+ if ((res= update_auto_increment()))
+ return res;
+ }
res= heap_write(file,buf);
if (!res && (++records_changed*HEAP_STATS_UPDATE_THRESHOLD >
file->s->records))