diff options
author | unknown <monty@mysql.com> | 2004-04-08 17:56:45 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-04-08 17:56:45 +0300 |
commit | 10e15762b8e38ae09d89e6489de6f2fe68cfd85e (patch) | |
tree | 1eb8cd825c2490f5f90d6e08cd2b0338ce489853 /sql/ha_myisam.cc | |
parent | 46bd7be2409e80b36de3cd0d49af33557ffa74a9 (diff) | |
download | mariadb-git-10e15762b8e38ae09d89e6489de6f2fe68cfd85e.tar.gz |
Don't enable HA_EXTRA_WRITE_CACHE if too few rows
Revert main parts of patch for online index builds. Should be done differently
Added support for %lx in my_snprintf()
sql/ha_myisam.cc:
Don't enable HA_EXTRA_WRITE_CACHE if too few rows
sql/handler.h:
Indentaion fix
sql/mysql_priv.h:
Removed real_alter_table, mysql_add_column and mysql_drop_column
sql/sql_class.cc:
After merge fix
sql/sql_insert.cc:
Don't user bulk_insert if only one row (common case)
sql/sql_parse.cc:
Added mysql_create_index() and mysql_drop_index() as these are only wrappers for mysql_alter_table()
sql/sql_table.cc:
Revert main parts of patch for online index builds
Changed back to use tabs to make merges possible between trees
sql/unireg.cc:
Added comments and minor cleanup
strings/my_vsnprintf.c:
Added support for %lx.
Proper long support
Diffstat (limited to 'sql/ha_myisam.cc')
-rw-r--r-- | sql/ha_myisam.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc index c56009dc0aa..ca264f500a6 100644 --- a/sql/ha_myisam.cc +++ b/sql/ha_myisam.cc @@ -867,7 +867,9 @@ void ha_myisam::start_bulk_insert(ha_rows rows) THD *thd=current_thd; ulong size= min(thd->variables.read_buff_size, table->avg_row_length*rows); - mi_extra(file, HA_EXTRA_WRITE_CACHE, (void*)&size); + /* don't enable row cache if too few rows */ + if (!rows && rows > 10) + mi_extra(file, HA_EXTRA_WRITE_CACHE, (void*) &size); can_enable_indexes= (file->s->state.key_map == set_bits(ulonglong, file->s->base.keys)); |