diff options
author | monty@mysql.com <> | 2004-12-18 05:19:21 +0200 |
---|---|---|
committer | monty@mysql.com <> | 2004-12-18 05:19:21 +0200 |
commit | 3fb088a075ebd3e4fe78d122911103618bd1cbe4 (patch) | |
tree | eb62c04f31efc6c7cb435cef36a43e2e361eed1c /sql/ha_myisam.cc | |
parent | b4dc75c877b45e2eb97e5fc15fda4292e0f6f705 (diff) | |
download | mariadb-git-3fb088a075ebd3e4fe78d122911103618bd1cbe4.tar.gz |
Add 0x before pointers (to help with debugging)
Add support for VARCHAR with 1 or 2 length bytes
Enable VARCHAR packing in MyISAM files (previous patch didn't pack data properly)
Give error if we got problems in temporary tables during a SELECT
Don't use new table generated by ALTER TABLE if index generation fails
Fixed wrong call by range_end() (Could cause an ASSERT in debug mode)
Diffstat (limited to 'sql/ha_myisam.cc')
-rw-r--r-- | sql/ha_myisam.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc index 726647cd131..dab3ea16377 100644 --- a/sql/ha_myisam.cc +++ b/sql/ha_myisam.cc @@ -926,8 +926,11 @@ int ha_myisam::enable_indexes(uint mode) { sql_print_warning("Warning: Enabling keys got errno %d, retrying", my_errno); + thd->clear_error(); param.testflag&= ~(T_REP_BY_SORT | T_QUICK); error= (repair(thd,param,0) != HA_ADMIN_OK); + if (!error && thd->net.report_error) + error= HA_ERR_CRASHED; } info(HA_STATUS_CONST); thd->proc_info=save_proc_info; @@ -1471,11 +1474,10 @@ int ha_myisam::create(const char *name, register TABLE *table_arg, break; if (found->flags & BLOB_FLAG) - { recinfo_pos->type= (int) FIELD_BLOB; - } - else if (!(options & HA_OPTION_PACK_RECORD) || - found->type() == MYSQL_TYPE_VARCHAR) + else if (found->type() == MYSQL_TYPE_VARCHAR) + recinfo_pos->type= FIELD_VARCHAR; + else if (!(options & HA_OPTION_PACK_RECORD)) recinfo_pos->type= (int) FIELD_NORMAL; else if (found->zero_pack()) recinfo_pos->type= (int) FIELD_SKIP_ZERO; |