summaryrefslogtreecommitdiff
path: root/storage/maria/ma_create.c
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-06-10 02:02:58 +0300
committerMichael Widenius <monty@askmonty.org>2011-06-10 02:02:58 +0300
commit13f55aac67343450d1c2872dd238d81093d09f11 (patch)
tree4923ca90a698bd273ce5693f62fc8566bcc5e660 /storage/maria/ma_create.c
parent5831ddcf3d40f16d23bbf8312dd587b0f1f669e0 (diff)
downloadmariadb-git-13f55aac67343450d1c2872dd238d81093d09f11.tar.gz
A bit better fix for tmp-table problem
Fixed reference to not initialized memory detected by valgrind sql/sql_select.cc: A bit better fix for tmp-table problem: Use only dynamic_record format for group by and distinct. storage/maria/ma_create.c: DYNAMIC_RECORD format doesn't pack VARCHAR fields. This change fixes a non-fatal uninitialized memory copy.
Diffstat (limited to 'storage/maria/ma_create.c')
-rw-r--r--storage/maria/ma_create.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/storage/maria/ma_create.c b/storage/maria/ma_create.c
index e7459f0d81a..ca6a5212044 100644
--- a/storage/maria/ma_create.c
+++ b/storage/maria/ma_create.c
@@ -204,7 +204,8 @@ int maria_create(const char *name, enum data_file_type datafile_type,
pack_reclength++;
not_block_record_extra_length++;
max_field_lengths++;
- packed++;
+ if (datafile_type != DYNAMIC_RECORD)
+ packed++;
column->fill_length= 1;
options|= HA_OPTION_NULL_FIELDS; /* Use ma_checksum() */