diff options
author | monty@mashka.mysql.fi <> | 2002-07-23 18:31:22 +0300 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2002-07-23 18:31:22 +0300 |
commit | dddc20d9d1eea5fd526a2082a43801fed304afe4 (patch) | |
tree | 2e458857fc65791ee553b4cde0e28ef9459050a5 /sql/table.cc | |
parent | 373e19dca1d209476a15d7d61cb350361c9d6efa (diff) | |
download | mariadb-git-dddc20d9d1eea5fd526a2082a43801fed304afe4.tar.gz |
New SET syntax & system variables.
Made a some new buffers thread specific and changeable.
Resize of key_buffer.
AUTO_COMMIT -> AUTOCOMMIT
Fixed mutex bug in DROP DATABASE
Fixed bug when using auto_increment as second part of a key where first part could include NULL.
Split handler->extra() to extra() and extra_opt() to be able to support thread specific buffers.
Don't write message to error log when slave reconnects becasue of timeout.
Fixed possible update problem when using DELETE/UPDATE on small tables
(In some cases we used index even if table scanning would be better)
A lot of minior code cleanups
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/sql/table.cc b/sql/table.cc index 2eb924caaf2..2a284d4c027 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -357,17 +357,7 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, } } if (reg_field->unireg_check == Field::NEXT_NUMBER) - { - if ((int) (outparam->next_number_index= (uint) - find_ref_key(outparam,reg_field, - &outparam->next_number_key_offset)) < 0) - reg_field->unireg_check=Field::NONE; /* purecov: inspected */ - else - { - outparam->found_next_number_field=reg_field; - reg_field->flags|=AUTO_INCREMENT_FLAG; - } - } + outparam->found_next_number_field= reg_field; if (outparam->timestamp_field == reg_field) outparam->timestamp_field_offset=i; if (use_hash) @@ -532,6 +522,20 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, bfill(outparam->null_flags+outparam->rec_buff_length*2,null_length,255); } + + if ((reg_field=outparam->found_next_number_field)) + { + if ((int) (outparam->next_number_index= (uint) + find_ref_key(outparam,reg_field, + &outparam->next_number_key_offset)) < 0) + { + reg_field->unireg_check=Field::NONE; /* purecov: inspected */ + outparam->found_next_number_field=0; + } + else + reg_field->flags|=AUTO_INCREMENT_FLAG; + } + if (outparam->blob_fields) { Field **ptr; |