summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc11
1 files changed, 1 insertions, 10 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 511a1567a53..b03f64bc7e0 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -4499,16 +4499,7 @@ void TABLE::init(THD *thd, TABLE_LIST *tl)
DBUG_ASSERT(!file->keyread_enabled());
- /* mark the record[0] uninitialized */
- TRASH_ALLOC(record[0], s->reclength);
-
- /*
- Initialize the null marker bits, to ensure that if we are doing a read
- of only selected columns (like in keyread), all null markers are
- initialized.
- */
- memset(record[0], 255, s->null_bytes);
- memset(record[1], 255, s->null_bytes);
+ restore_record(this, s->default_values);
/* Tables may be reused in a sub statement. */
DBUG_ASSERT(!file->extra(HA_EXTRA_IS_ATTACHED_CHILDREN));