summaryrefslogtreecommitdiff
path: root/sql/unireg.cc
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-06-30 13:23:54 +0300
committerunknown <monty@mashka.mysql.fi>2003-06-30 13:23:54 +0300
commitd0dc9e7db36d3dc81aaecd761bed47bb63878108 (patch)
tree8435e8821801b31bb1a8f3ff592b231e06a8be3e /sql/unireg.cc
parent27205cc64ba607babf4510ef712f021337968df7 (diff)
downloadmariadb-git-d0dc9e7db36d3dc81aaecd761bed47bb63878108.tar.gz
Remove FORCE_INIT_OF_VARS when compiling for valgrind/purify to spot wrong LINT_INIT() options
Fixed bug in ALTER TABLE ... MODIFY integer-column Added ref_or_null optimization (needed for subqueries) BUILD/compile-pentium-valgrind-max: Remove FORCE_INIT_OF_VARS to spot wrong LINT_INIT() options mysql-test/r/distinct.result: Update of test results (new optimizer) mysql-test/r/null_key.result: Update after ref_or_null optimization mysql-test/r/subselect.result: Update after ref_or_null optimization mysql-test/t/null_key.test: New tests for ref_or_null optimization sql/sql_select.cc: Added ref_or_null optimization Optimized find_best_combinations() and read-functions sql/sql_select.h: Added ref_or_null optimization sql/sql_yacc.yy: Fixed bug in ALTER TABLE ... MODIFY integer-column sql/table.cc: Safety fix for ALTER TABLE .. MODIFY sql/unireg.cc: Safety fix for ALTER TABLE .. MODIFY
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r--sql/unireg.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc
index 5e723281d3f..3e634f54b4f 100644
--- a/sql/unireg.cc
+++ b/sql/unireg.cc
@@ -460,8 +460,10 @@ static bool pack_fields(File file,List<create_field> &create_fields)
buff[13]= (uchar) field->sql_type;
if (field->sql_type == FIELD_TYPE_GEOMETRY)
buff[14]= (uchar) field->geom_type;
- else
+ else if (field->charset)
buff[14]= (uchar) field->charset->number;
+ else
+ buff[14]= 0; // Numerical
int2store(buff+15, field->comment.length);
comment_length+= field->comment.length;
set_if_bigger(int_count,field->interval_id);