Commit 1382d42f authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

closes #1634

fix ticket

git-svn-id: file:///svn/mysql/tokudb-engine/src@10894 c7de825b-a66e-492c-adef-691d508d4ae1
parent 4f6b03d7
...@@ -898,11 +898,12 @@ bool ha_tokudb::has_auto_increment_flag(uint* index) { ...@@ -898,11 +898,12 @@ bool ha_tokudb::has_auto_increment_flag(uint* index) {
// check to see if we have auto increment field // check to see if we have auto increment field
// //
bool ai_found = false; bool ai_found = false;
uint i = 0; uint ai_index = 0;
for (Field ** field = table->field; *field; field++,i++) { for (uint i = 0; i < table_share->fields; i++, ai_index++) {
if ((*field)->flags & AUTO_INCREMENT_FLAG) { Field* field = table->field[i];
if (field->flags & AUTO_INCREMENT_FLAG) {
ai_found = true; ai_found = true;
*index = i; *index = ai_index;
break; break;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment