From 784fb81426e917cb66ace05310ebccafb23a4b1b Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Sat, 3 May 2003 01:16:56 +0200 Subject: INSERT ... UPDATE ... VALUES() --- sql/table.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sql/table.cc') diff --git a/sql/table.cc b/sql/table.cc index fda1fcb36e4..3aed75c7ac6 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -267,6 +267,7 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, (ulong) (uint2korr(head+6)+uint2korr(head+14)), MYF(MY_NABP))) goto err_not_open; /* purecov: inspected */ + /* HACK: table->record[2] is used instead of table->default_values here */ for (i=0 ; i < records ; i++, record+=rec_buff_length) { outparam->record[i]=(byte*) record; @@ -276,11 +277,12 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, if (records == 2) { /* fix for select */ - outparam->record[2]=outparam->record[1]; + outparam->default_values=outparam->record[1]; if (db_stat & HA_READ_ONLY) outparam->record[1]=outparam->record[0]; /* purecov: inspected */ } - + outparam->insert_values=0; /* for INSERT ... UPDATE */ + VOID(my_seek(file,pos,MY_SEEK_SET,MYF(0))); if (my_read(file,(byte*) head,288,MYF(MY_NABP))) goto err_not_open; if (crypted) -- cgit v1.2.1