1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Update for BTREE keys in HEAP tables

Split handler->option_flag() to handler->table_flags() and handler->index_flags()


Docs/manual.texi:
  Updated standard binary options
include/my_base.h:
  Update for BTREE keys in HEAP tables
libmysql/net.c:
  merge with net_serv.cc
mysql-test/r/func_misc.result:
  Update for new behaviour of inet_ntoa
sql/field.cc:
  Update for BTREE keys in HEAP tables
sql/field.h:
  Update for BTREE keys in HEAP tables
sql/filesort.cc:
  Update for BTREE keys in HEAP tables
sql/ha_berkeley.h:
  Update for BTREE keys in HEAP tables
sql/ha_heap.h:
  Update for BTREE keys in HEAP tables
sql/ha_innodb.h:
  Update for BTREE keys in HEAP tables
sql/ha_isam.cc:
  Update for BTREE keys in HEAP tables
sql/ha_isam.h:
  Update for BTREE keys in HEAP tables
sql/ha_isammrg.h:
  Update for BTREE keys in HEAP tables
sql/ha_myisam.cc:
  Update for BTREE keys in HEAP tables
sql/ha_myisam.h:
  Update for BTREE keys in HEAP tables
sql/ha_myisammrg.h:
  Update for BTREE keys in HEAP tables
sql/handler.cc:
  Update for BTREE keys in HEAP tables
sql/handler.h:
  Update for BTREE keys in HEAP tables
sql/log.cc:
  Update for BTREE keys in HEAP tables
sql/net_serv.cc:
  Update for BTREE keys in HEAP tables
sql/opt_range.cc:
  Update for BTREE keys in HEAP tables
sql/opt_sum.cc:
  Update for BTREE keys in HEAP tables
sql/records.cc:
  Update for BTREE keys in HEAP tables
sql/sql_class.h:
  Update for BTREE keys in HEAP tables
sql/sql_handler.cc:
  Update for BTREE keys in HEAP tables
sql/sql_insert.cc:
  Update for BTREE keys in HEAP tables
sql/sql_select.cc:
  Update for BTREE keys in HEAP tables
sql/sql_show.cc:
  Update for BTREE keys in HEAP tables
sql/sql_table.cc:
  Update for BTREE keys in HEAP tables
sql/structs.h:
  Update for BTREE keys in HEAP tables
sql/table.cc:
  Update for BTREE keys in HEAP tables
sql/unireg.cc:
  Update for BTREE keys in HEAP tables
This commit is contained in:
unknown
2002-04-12 21:35:46 +03:00
parent 40a2774087
commit 6326ec9944
32 changed files with 222 additions and 158 deletions

View File

@@ -282,7 +282,7 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
file=get_new_handler((TABLE*) 0, create_info->db_type);
if ((create_info->options & HA_LEX_CREATE_TMP_TABLE) &&
(file->option_flag() & HA_NO_TEMP_TABLES))
(file->table_flags() & HA_NO_TEMP_TABLES))
{
my_error(ER_ILLEGAL_HA,MYF(0),table_name);
DBUG_RETURN(-1);
@@ -381,13 +381,13 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
DBUG_RETURN(-1);
}
if (auto_increment &&
(file->option_flag() & HA_WRONG_ASCII_ORDER))
(file->table_flags() & HA_NO_AUTO_INCREMENT))
{
my_error(ER_TABLE_CANT_HANDLE_AUTO_INCREMENT,MYF(0));
DBUG_RETURN(-1);
}
if (blob_columns && (file->option_flag() & HA_NO_BLOBS))
if (blob_columns && (file->table_flags() & HA_NO_BLOBS))
{
my_error(ER_TABLE_CANT_HANDLE_BLOB,MYF(0));
DBUG_RETURN(-1);
@@ -443,10 +443,12 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
key_info->key_parts=(uint8) key->columns.elements;
key_info->key_part=key_part_info;
key_info->usable_key_parts= key_number;
key_info->algorithm=key->algorithm;
/* TODO: Add proper checks if handler supports key_type and algorithm */
if (key->type == Key::FULLTEXT)
{
if (!(file->option_flag() & HA_CAN_FULLTEXT))
if (!(file->table_flags() & HA_CAN_FULLTEXT))
{
my_error(ER_TABLE_CANT_HANDLE_FULLTEXT, MYF(0));
DBUG_RETURN(-1);
@@ -470,7 +472,7 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
}
if (f_is_blob(sql_field->pack_flag))
{
if (!(file->option_flag() & HA_BLOB_KEY))
if (!(file->table_flags() & HA_BLOB_KEY))
{
my_printf_error(ER_BLOB_USED_AS_KEY,ER(ER_BLOB_USED_AS_KEY),MYF(0),
column->field_name);
@@ -496,7 +498,7 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
my_error(ER_PRIMARY_CANT_HAVE_NULL, MYF(0));
DBUG_RETURN(-1);
}
if (!(file->option_flag() & HA_NULL_KEY))
if (!(file->table_flags() & HA_NULL_KEY))
{
my_printf_error(ER_NULL_COLUMN_IN_INDEX,ER(ER_NULL_COLUMN_IN_INDEX),
MYF(0),column->field_name);
@@ -506,7 +508,7 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
}
if (MTYP_TYPENR(sql_field->unireg_check) == Field::NEXT_NUMBER)
{
if (column_nr == 0 || (file->option_flag() & HA_AUTO_PART_KEY))
if (column_nr == 0 || (file->table_flags() & HA_AUTO_PART_KEY))
auto_increment--; // Field is used
}
key_part_info->fieldnr= field;
@@ -526,14 +528,14 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
}
else if (column->length > length ||
((f_is_packed(sql_field->pack_flag) ||
((file->option_flag() & HA_NO_PREFIX_CHAR_KEYS) &&
((file->table_flags() & HA_NO_PREFIX_CHAR_KEYS) &&
(key_info->flags & HA_NOSAME))) &&
column->length != length))
{
my_error(ER_WRONG_SUB_KEY,MYF(0));
DBUG_RETURN(-1);
}
if (!(file->option_flag() & HA_NO_PREFIX_CHAR_KEYS))
if (!(file->table_flags() & HA_NO_PREFIX_CHAR_KEYS))
length=column->length;
}
else if (length == 0)
@@ -593,7 +595,7 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
}
}
if (!unique_key && !primary_key &&
(file->option_flag() & HA_REQUIRE_PRIMARY_KEY))
(file->table_flags() & HA_REQUIRE_PRIMARY_KEY))
{
my_error(ER_REQUIRES_PRIMARY_KEY,MYF(0));
DBUG_RETURN(-1);