Commit 079edf33 authored by monty@mysql.com's avatar monty@mysql.com

Code cleanups

parent d9790a40
This diff is collapsed.
......@@ -319,8 +319,9 @@ class handler :public Sql_alloc
virtual void append_create_info(String *packet) {}
virtual char* get_foreign_key_create_info()
{ return(NULL);} /* gets foreign key create string from InnoDB */
virtual uint referenced_by_foreign_key() { return 0;} /* used in REPLACE;
is > 0 if table is referred by a FOREIGN KEY */
/* used in REPLACE; is > 0 if table is referred by a FOREIGN KEY */
virtual uint referenced_by_foreign_key() { return 0;}
virtual void init_table_handle_for_HANDLER()
{ return; } /* prepare InnoDB for HANDLER */
virtual void free_foreign_key_create_info(char* str) {}
......
......@@ -438,7 +438,8 @@ int write_record(TABLE *table,COPY_INFO *info)
key_copy((byte*) key,table,key_nr,0);
if ((error=(table->file->index_read_idx(table->record[1],key_nr,
(byte*) key,
table->key_info[key_nr].key_length,
table->key_info[key_nr].
key_length,
HA_READ_KEY_EXACT))))
goto err;
}
......@@ -449,8 +450,8 @@ int write_record(TABLE *table,COPY_INFO *info)
UPDATE.
*/
if (last_uniq_key(table,key_nr)
&& !table->file->referenced_by_foreign_key())
if (last_uniq_key(table,key_nr) &&
!table->file->referenced_by_foreign_key())
{
if ((error=table->file->update_row(table->record[1],table->record[0])))
goto err;
......
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