summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorunknown <magnus@neptunus.(none)>2004-05-05 16:04:23 +0200
committerunknown <magnus@neptunus.(none)>2004-05-05 16:04:23 +0200
commit9d99ebe39435ea8636c0c0770a3d8720f90d4111 (patch)
treeca74010686ba4f1a99c1aeedfa67c8715dc96eb4 /sql/sql_table.cc
parent4e4262cca9af62f92f3935fb82fd96f54b9e9c50 (diff)
downloadmariadb-git-9d99ebe39435ea8636c0c0770a3d8720f90d4111.tar.gz
BUG# 3658 ALTER TABLE corrupts table
Added test file for ALTER TABLE, engine = ndbcluster sql/ha_ndbcluster.cc: Add code to retriev all fields if HA_EXTRA_RETRIEVE_ALL_COLS are set. sql/ha_ndbcluster.h: Add var for retreiving all fields sql/sql_table.cc: Send HA_EXTRA_RETRIEVE_ALL_COLS to handler in copy_data_between_tables
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 0d0be1b7e10..3cb3afafc09 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -3219,7 +3219,11 @@ copy_data_between_tables(TABLE *from,TABLE *to,
error= 1;
goto err;
}
-
+
+ /* Handler must be told explicitly to retrieve all columns, because
+ this function does not set field->query_id in the columns to the
+ current query id */
+ from->file->extra(HA_EXTRA_RETRIEVE_ALL_COLS);
init_read_record(&info, thd, from, (SQL_SELECT *) 0, 1,1);
if (handle_duplicates == DUP_IGNORE ||
handle_duplicates == DUP_REPLACE)