diff options
author | unknown <monty@donna.mysql.com> | 2000-10-17 00:47:15 +0300 |
---|---|---|
committer | unknown <monty@donna.mysql.com> | 2000-10-17 00:47:15 +0300 |
commit | 0c511215f23809c4b9e8f5c26ad96520252e7758 (patch) | |
tree | ab2709570d10aac2956fa63114d45c79b2b5ea19 /sql/field.cc | |
parent | 9c019f4e4fc4d34f3c82723d1182f0917b9c5360 (diff) | |
download | mariadb-git-0c511215f23809c4b9e8f5c26ad96520252e7758.tar.gz |
Automatic repair of MyISAM tables + small bug fixes
Docs/manual.texi:
Updates for 3.23.26
include/Makefile.am:
Install my_config.h
include/my_pthread.h:
Fix for Ia64
myisam/mi_check.c:
Wrong new record pos on dupplicate key error
myisam/mi_open.c:
Fix for automatic repair
myisam/myisamchk.c:
Fix for automatic repair
myisam/myisamdef.h:
Fix for automatic repair
mysys/mf_tempfile.c:
Fix usage of mkstemp
sql-bench/bench-init.pl.sh:
Better help text
sql-bench/test-insert.sh:
Fix for slow databases
sql/field.cc:
Fix of default values for CREATE TABLE ... SELECT
sql/ha_berkeley.cc:
Fix bug in BDB records_in_range
sql/ha_myisam.cc:
Fix for automatic repair
sql/ha_myisam.h:
Fix for automatic repair
sql/handler.cc:
Fixes for innobase
sql/item_strfunc.cc:
Fix for SUBSTR_INDEX and REPLACE
sql/log_event.h:
Portability fix
sql/mysqld.cc:
Added INNOBASE and fixes for automatic recover of MyISAM tables
sql/sql_base.cc:
Fix for automatic repair
sql/sql_table.cc:
Fix for IF EXISTS when used with CREATE TEMPORARY
Diffstat (limited to 'sql/field.cc')
-rw-r--r-- | sql/field.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/field.cc b/sql/field.cc index 67bc84c0e3b..459c53ffcb1 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -4574,6 +4574,7 @@ create_field::create_field(Field *old_field,Field *orig_field) interval= ((Field_enum*) old_field)->typelib; else interval=0; + def=0; if (!old_field->is_real_null() && ! (flags & BLOB_FLAG) && old_field->type() != FIELD_TYPE_TIMESTAMP && old_field->ptr && orig_field) @@ -4584,15 +4585,14 @@ create_field::create_field(Field *old_field,Field *orig_field) /* Get the value from record[2] (the default value row) */ my_ptrdiff_t diff= (my_ptrdiff_t) (orig_field->table->rec_buff_length*2); orig_field->move_field(diff); // Points now at record[2] + bool is_null=orig_field->is_real_null(); res=orig_field->val_str(&tmp,&tmp); orig_field->move_field(-diff); // Back to record[0] - if (res) // If not NULL value + if (!is_null) { pos= (char*) sql_memdup(tmp.ptr(),tmp.length()+1); pos[tmp.length()]=0; def=new Item_string(pos,tmp.length()); } } - else - def=0; } |