Commit graph

14 commits

Author SHA1 Message Date
Mattias Jonsson
92655149a6 merge 2010-09-13 15:56:56 +02:00
Mattias Jonsson
0ec8312f72 Bug#53806: Wrong estimates for range query in partitioned MyISAM table
Bug#46754: 'rows' field doesn't reflect partition pruning
  
Update of test results after fixing the above bugs.
(fix in separate commit).

mysql-test/r/partition.result:
  Updated test result after fixing bugs 46754 and 53806
mysql-test/r/partition_hash.result:
  Updated test result after fixing bugs 46754 and 53806
mysql-test/r/partition_innodb.result:
  Updated test result after fixing bugs 46754 and 53806
mysql-test/r/partition_range.result:
  Updated test result after fixing bugs 46754 and 53806
mysql-test/suite/parts/r/partition_alter3_innodb.result:
  Updated test result after fixing bugs 46754 and 53806
mysql-test/suite/parts/r/partition_alter3_myisam.result:
  Updated test result after fixing bugs 46754 and 53806
2010-08-27 10:43:51 +02:00
Guilhem Bichot
56312dc7cf Backport of the fix for BUG#33730 "Full table scan instead selected partitions for query more than 10 partitions"
from 6.0, made in sergefp@mysql.com-20090205190644-q8632sniogedhtsu
2009-10-05 22:59:19 +02:00
Mattias Jonsson
d11d5cfca8 Bug#35745: SELECT COUNT(*) is not correct for some partitioned tables.
problem was that ha_partition::records was not implemented, thus
using the default handler::records, which is not correct if the engine
does not support HA_STATS_RECORDS_IS_EXACT.
Solution was to implement ha_partition::records as a wrapper around
the underlying partitions records.

The rows column in explain partitions will now include the total
number of records in the partitioned table.

(recommit after removing out-commented code)
2008-07-07 22:42:19 +02:00
unknown
4c31c41fdc Bug#30822: ALTER TABLE COALESCE PARTITION causes segmentation fault
Problem was for LINEAR HASH/KEY. Crashes because of wrong partition id
returned when creating the new altered partitions. (because of wrong
linear hash mask)

Solution: Update the linear hash mask before using it for the new
altered table.


mysql-test/r/partition_hash.result:
  Bug#30822: ALTER TABLE COALESCE PARTITION causes segmentation fault
  
  test result
mysql-test/t/partition_hash.test:
  Bug#30822: ALTER TABLE COALESCE PARTITION causes segmentatition fault
  
  test case
sql/ha_partition.cc:
  Bug#30822: ALTER TABLE COALESCE PARTITION causes segmentation fault
  
  Updating the linear hash mask before using it.
sql/sql_partition.cc:
  Bug#30822: ALTER TABLE COALESCE PARTITION causes segmentation fault
  
  exporting the set_linear_hash_mask function (static -> non static)
sql/sql_partition.h:
  Bug#30822: ALTER TABLE COALESCE PARTITION causes segmentation fault
  
  exporting the set_linear_hash_mask function (static -> non static)
2007-11-20 11:21:00 +01:00
unknown
076f2f732d Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table
  
Post-pushbuild fix
  
Pushbuild detected a new need for lex initialization in
embedded server.

Fixed test for INSERT DELAYED in partitions_hash.test so that
it works with embedded server.


libmysqld/lib_sql.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
                  partitioned table
  Initialized lex for later use in open_table().
mysql-test/r/partition_hash.result:
  Bug#31210 - INSERT DELAYED crashes server when used on
                  partitioned table
  Fixed test result for embedded server.
mysql-test/t/partition_hash.test:
  Bug#31210 - INSERT DELAYED crashes server when used on
                  partitioned table
  Fixed test for embedded server.
2007-11-11 20:38:28 +01:00
unknown
e5b2745efc Bug#31210 - INSERT DELAYED crashes server when used on
partitioned table

Trying INSERT DELAYED on a partitioned table, that has not been
used right before, crashes the server. When a table is used for
select or update, it is kept open for some time. This period I
mean with "right before".

Information about partitioning of a table is stored in form of
a string in the .frm file. Parsing of this string requires a
correctly set up lexical analyzer (lex). The partitioning code
uses a new temporary instance of a lex. But it does still refer
to the previously active lex. The delayd insert thread does not
initialize its lex though...

Added initialization for thd->lex before open table in the delayed
thread and at all other places where it is necessary to call
lex_start() if all tables would be partitioned and need to parse
the .frm file.


mysql-test/r/partition_hash.result:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Added test result
mysql-test/t/partition_hash.test:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Added test
sql/event_scheduler.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Initialized lex for later use in open_table().
sql/events.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Initialized lex for later use in open_table().
sql/ha_ndbcluster_binlog.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Initialized lex for later use in open_table().
sql/slave.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Initialized lex for later use in open_table().
sql/sql_acl.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Initialized lex for later use in open_table().
sql/sql_base.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Asserted that lex is initialized in open_table().
sql/sql_connect.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Initialized lex for later use in open_table().
sql/sql_insert.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Added initialization for thd->lex before open table.
sql/sql_lex.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Added 'is_lex_started' to test if lex is initialized.
sql/sql_lex.h:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Added 'is_lex_started' to test if lex is initialized.
sql/sql_plugin.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Initialized lex for later use in open_table().
sql/sql_servers.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Initialized lex for later use in open_table().
sql/sql_udf.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Initialized lex for later use in open_table().
sql/table.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Asserted that lex is initialized in open_table_from_share().
sql/tztime.cc:
  Bug#31210 - INSERT DELAYED crashes server when used on
              partitioned table
  Initialized lex for later use in open_table().
2007-11-05 16:25:40 +01:00
unknown
f66a3c0427 Reapplied patch for bug18198 2007-04-04 16:26:32 +02:00
unknown
93f4daf1b4 BUG#18198: Partition function handling
Fixes of after review fixes


mysql-test/r/partition_hash.result:
  Fixed test cases
mysql-test/r/partition_range.result:
  Fixed test cases
mysql-test/t/partition_range.test:
  Fixed test cases
sql/ha_ndbcluster.cc:
  Fixed error printout to avoid complex character set code in print_error
sql/ha_partition.cc:
  Fixed error printout to avoid complex character set code in print_error
sql/partition_info.cc:
  Fixed error printout to avoid complex character set code in print_error
sql/partition_info.h:
  Fixed error printout to avoid complex character set code in print_error
sql/sql_partition.cc:
  indendentation fix
2006-10-02 15:52:29 -04:00
unknown
d3b743ae18 BUG20733: Bug in partition pruning with zerofill field
Problem was with handling NULL values in ranges


mysql-test/r/partition_hash.result:
  New partition pruning test cases
mysql-test/r/partition_list.result:
  New partition pruning test cases
mysql-test/r/partition_pruning.result:
  New partition pruning test cases
mysql-test/r/partition_range.result:
  New partition pruning test cases
mysql-test/t/partition_hash.test:
  New partition pruning test cases
mysql-test/t/partition_list.test:
  New partition pruning test cases
mysql-test/t/partition_pruning.test:
  New partition pruning test cases
mysql-test/t/partition_range.test:
  New partition pruning test cases
sql/opt_range.cc:
  Added comment
sql/sql_partition.cc:
  Partition pruning didn't handle ranges with NULL values in a proper manner
2006-07-20 05:28:16 -04:00
unknown
8a43d4afee BUG#18423: Added test case for this bug that was already fixed (was issue with hash partitions not showing all rows in BETWEEN range
Added test case for bug 18423


mysql-test/r/partition_hash.result:
  Added test case for bug 18423
mysql-test/t/partition_hash.test:
  Added test case for bug 18423
2006-04-10 10:44:47 -04:00
unknown
a0b5fe13e0 BUG# 14524 - Partitions: crash if blackhole
This bug was fixed through other patches.  This test case just shows 
that it is fixed.


mysql-test/r/partition_hash.result:
  result block for bug #14524
mysql-test/t/partition_hash.test:
  test block for bug# 14524
2006-01-30 10:07:39 -06:00
unknown
e262e74419 Bug# 15968 - Partitions: crash when insert with f1 = -1 into partition by hash(f1)
fixed


mysql-test/r/partition_hash.result:
  results for newly added test.
mysql-test/t/partition_hash.test:
  test case for inserting a value into a hash that would generate a negative value
sql/sql_partition.cc:
  fields that generate a negative value would also generate a negative
  part_id which doesn't index into the m_file array to well.
2006-01-06 18:52:49 -06:00
unknown
cd483c5520 Patch for push of wl1354 Partitioning 2005-07-18 13:31:02 +02:00