Commit graph

194 commits

Author SHA1 Message Date
gluh@eagle.(none)
4f5868114a Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
2007-12-13 15:56:04 +04:00
holyfoot/hf@hfmain.(none)
18e6de9f15 Merge mysql.com:/home/hf/work/32247/my51-32247
into  mysql.com:/home/hf/work/mrg/my51-mrg
2007-12-06 16:43:52 +04:00
holyfoot/hf@mysql.com/hfmain.(none)
dc01dba255 Bug #32247 Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table).
ha_partition::update_create_info() just calls update_create_info
of a first partition, so only get the autoincrement maximum
of the first partition, so SHOW CREATE TABLE can show
small AUTO_INCREMENT parameters.
Fixed by implementing ha_partition::update_create_info() in a way
other handlers work.
HA_ARCHIVE:stats.auto_increment handling made consistent with other engines
2007-12-06 16:39:42 +04:00
holyfoot/hf@hfmain.(none)
a756bfd408 Merge mysql.com:/home/hf/work/31890/my51-31890
into  mysql.com:/home/hf/work/mrg/my51-mrg
2007-11-30 22:25:03 +04:00
ramil/ram@ramil.myoffice.izhnet.ru
2b65845a99 Merge mysql.com:/home/ram/work/mysql-5.1-engines
into  mysql.com:/home/ram/work/b29258/b29258.5.1
2007-11-30 09:18:26 +04:00
sergefp@mysql.com
7d6d808b6a BUG#32772: partition crash 1: enum column
The bug was that for ordered index scans, ha_partition::index_init() did
not put index columns into table->read_set if the underlying storage 
engine did not have HA_PARTIAL_COLUMN_READ flag. 
This was causing assertion failure when handle_ordered_index_scan() tried
to sort the records according to index order.

Fixed by making ha_partition::index_init() put index columns into table->read_set
for all ordered scans.
2007-11-28 03:02:05 +03:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
d20dcd2421 after-merge fix:
- archive test/result adjusted.
  - OPTIMIZE/ANALYZE PARTITION EXTENDED test case added.
2007-11-27 12:28:08 +04:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
beff6193e0 Fix for bug #29258: Partitions: search fails for maximum unsigned bigint
Problems: 
  1. looking for a matching partition we miss the fact that the maximum 
     allowed value is in the PARTITION p LESS THAN MAXVALUE.
  2. one can insert maximum value if numeric maximum value is the last range.
     (should only work if LESS THAN MAXVALUE).
  3. one cannot have both numeric maximum value and MAXVALUE string as ranges 
    (the same value, but different meanings).

Fix: consider the maximum value as a supremum.
2007-11-26 10:28:25 +04:00
istruewing@stella.local
6d06272e8a Merge stella.local:/home2/mydev/mysql-5.1-amain
into  stella.local:/home2/mydev/mysql-5.1-axmrg
2007-11-16 14:07:59 +01:00
istruewing@stella.local
2ecdc68e55 Bug#22351 - handler::index_next_same() call to key_cmp_if_same() uses
the wrong buffer
Post-pushbuild fix
Added test case for better coverage.
2007-11-15 11:36:50 +01:00
holyfoot/hf@mysql.com/hfmain.(none)
a2f08506e1 Bug #31890 Partitions: ORDER BY DESC in InnoDB not working.
It's not InnoDB specific bug.
Error is in QUEUE code, about the way we handle queue->max_at_top.
It's either '0' or '-2' and we do '^' operation to get the proper
direction. Though queue->compare() function can return '-2' as
a result of comparison sometimes. So we'll get
queue->compare() ^ queue->max_at_top == 0 (when max_at_top is -2)
and _downheap() function code will go wrong way here:
...
    if (next_index < elements &&
        (queue->compare(queue->first_cmp_arg,
                        queue->root[next_index]+offset_to_key,
                        queue->root[next_index+1]+offset_to_key) ^
         queue->max_at_top) > 0)
      next_index++;
...

Fixed by changing max_at_top to be either 1 or -1, doing
'* max_at_top' to get proper direction.
2007-11-14 22:20:31 +04:00
gluh@eagle.(none)
58336411c9 Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
2007-11-14 17:30:16 +04:00
holyfoot/hf@mysql.com/hfmain.(none)
8085bed591 Bug #32067 Partitions: crash with timestamp column.
Partition handler fails updating tables with partitioning
based on timestamp field, as it calculates the timestamp field
AFTER it calculates the number of partition of a record.

Fixed by adding timestamp_field->set_time() call and disabling
such consequent calls
2007-11-12 21:11:31 +04:00
mattiasj@mattiasj-laptop.(none)
75fea7f6d9 Merge mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-bug29368
into  mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-lastfinaltopush
2007-11-12 14:58:20 +01:00
holyfoot/hf@mysql.com/hfmain.(none)
2b3947a6a5 'no innodb engine' test failure fixed 2007-11-12 14:26:09 +04:00
mattiasj@mattiasj-laptop.(none)
43c1daf630 Bug#29368: Modified error messages
Problem: there was no standard syntax error when
         creating partitions with syntax error in
         the partitioning clause.

Solution: added "Syntax error: " to the error message
2007-11-10 13:09:18 +01:00
istruewing@stella.local
88f66ce976 Merge stella.local:/home2/mydev/mysql-5.1-amain
into  stella.local:/home2/mydev/mysql-5.1-axmrg
2007-11-02 10:53:20 +01:00
holyfoot/hf@mysql.com/hfmain.(none)
edbf4120f6 Bug #31893 Partitions: crash if subpartitions and engine change.
The new default database engine for altered table was reassigned to
the old one. That's wrong thing by itself, and (as the engine
for a subpartition gets that new value) leads to DBUG_ASSERTION
in mysql_unpack_partition()
2007-10-31 16:01:29 +04:00
joerg@trift2.
77c4bfe63a Merge trift2.:/MySQL/M51/mysql-5.1
into  trift2.:/MySQL/M51/push-5.1
2007-10-29 12:56:48 +01:00
mattiasj@mattiasj-laptop.(none)
e21b150a59 Merge mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-engines
into  mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-bug30878
2007-10-23 22:13:00 +02:00
mattiasj@mattiasj-laptop.(none)
2d71933f51 Merge mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-bug30695
into  mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-bug30878
2007-10-23 22:07:45 +02:00
mattiasj@mattiasj-laptop.(none)
f733ea5a06 Bug #30695: An apostrophe ' in the comment of the ADD PARTITION
causes the Server to crash.

Accessing partitioned table with an apostrophe in partition options
like DATA DIRECTORY, INDEX DIRECTORY or COMMENT causes server crash.

Partition options were saved in .frm file without escaping.
When accessing such table it is not possible to properly restore
partition information.
Crashed because there was no check for partition info parser failure.

Fixed by escaping quoted text in the partition info when writing it to
the frm-file and added a check that it was able to parse the partition
info before using it 

NOTE: If the comment is written by an earlier version of the server,
the corrupted frm-file is not fixed, but left corrupted, you have to
manually drop the table and recreate it.
2007-10-23 22:04:09 +02:00
mleich@four.local.lan
51fd4937c4 This changeset contains the following stuff:
- Fix for
    Bug#28827 Partition test needs archive engine
    Bug#26669 Two tests on partition fail while blackhole engine is missing
  Solution: Move ARCHIVE and BLACKHOLE sub test cases to their own main test.
- The two bugs above + the fact that CSV could be also sometimes not
  available --> Move also CSV sub tests out.
- Minor cleanups
  - Replace error numbers with error names
  - fix typos, wrong comments
  - remove redundant sub test cases
  - add missing drop database
  - SET GLOBAL general_log = default is wrong, = 1 is correct
2007-10-22 20:10:51 +02:00
antony@pcg5ppc.xiphis.org
3b95727600 Merge anubis.xiphis.org:/usr/home/antony/work/mysql-5.1-engines
into  anubis.xiphis.org:/usr/home/antony/work/mysql-5.1-engines.merge
2007-10-19 13:06:37 -07:00
mattiasj@mattiasj-laptop.(none)
7c16fd2c0f Bug #30878: Crashing when alter an auto_increment non partitioned
table to partitioned

Problem:
Crashed because usage of an uninitialised mutex when auto_incrementing
  a partitioned temporary table

Fix:
Only locking (using the mutex) if not temporary table.
2007-10-17 20:40:23 +02:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
e908bb72e5 Fix for bug #29444: crash with partition refering to table in create-select
Problem: creating a partitioned table during name resolution for the 
partition function we search for column names in all parts of the
CREATE TABLE query. It is superfluous (and wrong) sometimes.

Fix: launch name resolution for the partition function against
the table we're creating.
2007-10-09 19:16:39 +05:00
mattiasj@mattiasj-laptop.(none)
8edc46ff16 Bug #30484: Partitions: crash with self-referencing trigger
Two cases in ha_partition::extra() was missing
(HA_EXTRA_DELETE_CANNOT_BATCH and HA_EXTRA_UPDATE_CANNOT_BATCH)
which only is currently used by NDB (which not uses ha_partition)
2007-10-04 14:56:33 +02:00
mikael@dator6.(none)
da7e78cead removed test case no longer supported 2007-07-02 20:11:54 +02:00
holyfoot/hf@hfmain.(none)
0d7168602d Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/27084/my51-27084
2007-06-25 14:28:30 +05:00
tsmith@quadxeon.mysql.com
918090030b Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1-build
into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/jun14/51
2007-06-15 01:57:33 +02:00
gkodinov/kgeorge@magare.gmz
949d96f175 Bug #27816: Log tables ran with partitions crashes the server
when logging is enabled.
Currently the partition engine doesn't allow log tables to
be partitioned. But this was not checked and the server crashed.
Fixed by adding a check in ALTER TABLE to disable partitioning the
log tables.
While working on the cause of the problem improved the way the log
thread structures are initialized before opening the log tables.
2007-06-08 17:12:42 +03:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
46f68b228e Fix for bug #28806: Running SHOW TABLE STATUS during high INSERT load crashes server
Problem: getting an autoincrement value for a partition table in the ::info() method we call
the get_auto_increment() for all partitions. That may cause a problem for at least MyISAM
tables that rely on some table state (in this particular case table->naxt_nuber_field is 
set to 0 in the mysql_insert() and we get a crash). 
Moreover, calling get_auto_increment() is superfluous there.

Fix: use ::info(HA_STATUS_AUTO) calls to get autoincrement values for partitions instead of
get_auto_increment() ones in the ha_partition::info().
2007-06-07 15:50:13 +05:00
gkodinov/kgeorge@macbook.gmz
f081188fcb Bug #28488: Incorrect information in file: './test/t1_test#.frm'
While executing ALTER TABLE ... PARTITION the server uses 
a temporary "shadow" table to create the updated table.
This shadow table then gets renamed as the original table.
The shadow table was not prefixed with the special prefix that
marks temporary tables so it was picked up by SHOW TABLE STATUS.
Fixed by isolating the code to create the shadow table name in a
separate function and prefixing the shadow table name with the
special prefix to exclude it from the list of user tables.
See bug 18775 and WL1324 for details.
2007-06-04 18:56:29 +03:00
holyfoot/hf@mysql.com/hfmain.(none)
5b0c8f256d Bug #28005 Partitions: can't use -9223372036854775808
the Item_neg changes INT_RESULT with DECIMAL_RESULT when
it gets this border value, what is not necessary.
2007-05-06 23:40:16 +05:00
holyfoot/hf@hfmain.(none)
d71147a2c5 Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/27123/my51-27123
2007-04-30 19:41:27 +05:00
iggy@recycle.(none)
2a54abd582 Bug#25141 Crash Server on Partitioning command
- The function build_table_filename() builds up a string unconditionally 
using the forward slash as a path separator. Later, when the string is 
searched for FN_LIBCHAR by the set_up_table_before_create() function, a 
null pointer is returned that is finally used by strlen in the 
append_file_to_dir() function which causes the crash.
2007-04-23 13:50:34 -04:00
holyfoot/hf@mysql.com/hfmain.(none)
b4d186efb7 Bug #27123 (partition + on duplicate key update + varchar = Can't find
record in table)

key_restore function didn't work as intended in the case of
VARCHAR or BLOB fields, stored the restored key in field->ptr instead
of to_record.
That produced the wrong key so search returned wrong result
2007-04-19 21:43:42 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
497ff2fa9c bug #24633 (sql_mode NO_DIR_IN_CREATE doesn't work with partitioned tables)
additional patch to fix SHOW CREATE behaviour
2007-03-29 18:42:27 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
576f2f8474 Bug #27084 partitioning by list seems failing when using case
creation of the partitioned table could fail as we created Item-s for
it's list function in thd->mem_root, and then do Item->fix_fields
in the context of other table->mem_root (so that memory alloced
there was alloced in this table->mem_root). As we freed the
table->mem_root before we do thd->free_items, our Item-s had
pointers to the freed memory, that caused the crash
2007-03-27 16:15:38 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
ce89422b97 Bug #24633 SQL MODE "NO_DIR_IN_CREATE" does not work with
partitioned tables"
We have to ignore 'data directory' and 'index directory' parameters
if NO_DIR_IN_CREATE set.
2007-03-11 01:17:41 +04:00
holyfoot/hf@mysql.com/deer.(none)
3fd278c9d3 bug #24186 (nested query across partitions returns fewer records)
Subselect's engine checks table->status field to determine if the
record was properly found when we use keyread upon the table.
Partition engine checks all the partitions for given key
before return. So if matching record was found in the first
partition and no matching records were found in the second, 
we have table->status == NOT_FOUND after the function, what
makes subselects to skip matching records.
The patch adds table->status= 0 if we actually found something.
2007-01-12 15:46:20 +04:00
holyfoot/hf@mysql.com/deer.(none)
3f2ef81771 bug #24502 (reorganize partition closes connection)
when REORGANIZE creates new partition, no_subparts for that partition
isn't set right (call handler::set_partitions_defaults always returns 1)
Normally the number of subpartitions should be inherited from the
table.
2006-12-18 14:39:23 +04:00
cmiller@zippy.cornsilk.net
184467a2cc Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
2006-10-17 11:23:07 -04:00
mikael/pappa@dator5.(none)
4a7cd3a1cb Merge dator5.(none):/home/pappa/clean-mysql-5.1
into  dator5.(none):/home/pappa/bug18198
2006-10-16 15:40:40 -04:00
msvensson@neptunus.(none)
6273db415e Merge neptunus.(none):/home/msvensson/mysql/same_tools/my51-same_tools
into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint
2006-10-06 13:12:53 +02:00
msvensson@neptunus.(none)
db4966f99f Update partition test to use the new command "file_exist" 2006-10-06 00:06:53 +02:00
msvensson@neptunus.(none)
ca21b57992 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.1
into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint
2006-10-03 09:28:44 +02:00
brian@zim.(none)
56505c01f9 This patch updates to remove most global hton needs. Cleans up wrong message in partition. 2006-09-30 18:31:13 -07:00
cmiller@zippy.cornsilk.net
53c14121d8 Update from Stefan. 2006-09-29 msg id <451BEF1.4030506@mysql.com> 2006-09-29 09:12:23 -04:00
mikael/pappa@dator5.(none)
fef3cb337c Merge dator5.(none):/home/pappa/clean-mysql-5.1-kt
into  dator5.(none):/home/pappa/bug18198
2006-09-28 06:16:16 -04:00