diff options
author | serg@serg.mylan <> | 2003-05-03 01:16:56 +0200 |
---|---|---|
committer | serg@serg.mylan <> | 2003-05-03 01:16:56 +0200 |
commit | 784fb81426e917cb66ace05310ebccafb23a4b1b (patch) | |
tree | 467d41e9c8504f3a06fc667f9a989394e4a6bce7 /sql/table.cc | |
parent | 0f653b6fed0c742aa49ed621839eaeda080ebb20 (diff) | |
download | mariadb-git-784fb81426e917cb66ace05310ebccafb23a4b1b.tar.gz |
INSERT ... UPDATE ... VALUES()
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 6 |
1 files changed, 4 insertions, 2 deletions
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) |