diff options
author | unknown <anozdrin/alik@station.> | 2007-12-14 16:30:22 +0300 |
---|---|---|
committer | unknown <anozdrin/alik@station.> | 2007-12-14 16:30:22 +0300 |
commit | 541ac204014fb7a051156fb369fadcf77342788c (patch) | |
tree | 362dc5c4acd0fff3e86d1b9d4b96ef068d73b341 /sql/ha_partition.cc | |
parent | a6eec72e7bcf1ef04dd4569e51fa8845cb192fc1 (diff) | |
parent | 35742460f4f252f6d08217997ea2f103b57a5201 (diff) | |
download | mariadb-git-541ac204014fb7a051156fb369fadcf77342788c.tar.gz |
Merge station.:/mnt/raid/alik/MySQL/devel/5.1
into station.:/mnt/raid/alik/MySQL/devel/5.1-rt
client/mysqltest.c:
Auto merged
include/mysql_com.h:
Auto merged
libmysqld/emb_qcache.cc:
Auto merged
libmysqld/emb_qcache.h:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
mysql-test/lib/mtr_report.pl:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/table.cc:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
sql/protocol.cc:
SCCS merged
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r-- | sql/ha_partition.cc | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 5d712b5c64e..3f1634a6ad1 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -1606,7 +1606,11 @@ error: void ha_partition::update_create_info(HA_CREATE_INFO *create_info) { - m_file[0]->update_create_info(create_info); + info(HA_STATUS_AUTO); + + if (!(create_info->used_fields & HA_CREATE_USED_AUTO)) + create_info->auto_increment_value= stats.auto_increment_value; + create_info->data_file_name= create_info->index_file_name = NULL; return; } @@ -3422,14 +3426,17 @@ int ha_partition::index_init(uint inx, bool sorted) */ if (m_lock_type == F_WRLCK) bitmap_union(table->read_set, &m_part_info->full_part_field_set); - else if (sorted && m_table_flags & HA_PARTIAL_COLUMN_READ) + else if (sorted) { /* - An ordered scan is requested and necessary fields aren't in read_set. - This may happen e.g. with SELECT COUNT(*) FROM t1. We must ensure - that all fields of current key are included into read_set, as - partitioning requires them for sorting - (see ha_partition::handle_ordered_index_scan). + An ordered scan is requested. We must make sure all fields of the + used index are in the read set, as partitioning requires them for + sorting (see ha_partition::handle_ordered_index_scan). + + The SQL layer may request an ordered index scan without having index + fields in the read set when + - it needs to do an ordered scan over an index prefix. + - it evaluates ORDER BY with SELECT COUNT(*) FROM t1. TODO: handle COUNT(*) queries via unordered scan. */ |