Commit graph

290 commits

Author SHA1 Message Date
kent@mysql.com
5d722a8491 Merge 2006-02-28 23:29:58 +01:00
tomas@poseidon.ndb.mysql.com
5a46fbfbd8 Bug #17499 continued
- moved initialization of used_partitions
- more tests

+ removed reference to fixed bugs
2006-02-28 17:51:27 +01:00
tomas@poseidon.ndb.mysql.com
81479bde6a Bug #17701, ALTER TABLE t1 ADD PARTITION for PARTITION BY LIST hangs test
- code wrongly tries to do a "fast alter partition", although not supported
2006-02-28 12:29:50 +01:00
guilhem@mysql.com
0071749595 WL#2977 and WL#2712 global and session-level variable to set the binlog format (row/statement),
and new binlog format called "mixed" (which is statement-based except if only row-based is correct,
in this cset it means if UDF or UUID is used; more cases could be added in later 5.1 release):
SET GLOBAL|SESSION BINLOG_FORMAT=row|statement|mixed|default;
the global default is statement unless cluster is enabled (then it's row) as in 5.1-alpha.
It's not possible to use SET on this variable if a session is currently in row-based mode and has open temporary tables (because CREATE
TEMPORARY TABLE was not binlogged so temp table is not known on slave),  or if NDB is enabled (because
NDB does not support such change on-the-fly, though it will later), of if in a stored function (see below).
The added tests test the possibility or impossibility to SET, their effects, and the mixed mode,
including in prepared statements and in stored procedures and functions.
Caveats:
a) The mixed mode will not work for stored functions: in mixed mode, a stored function will
always be binlogged as one call and in a statement-based way (e.g. INSERT VALUES(myfunc()) or SELECT myfunc()).
b) for the same reason, changing the thread's binlog format inside a stored function is
refused with an error message.
c) the same problems apply to triggers; implementing b) for triggers will be done later (will ask
Dmitri).
Additionally, as the binlog format is now changeable by each user for his session, I remove the implication
which was done at startup, where row-based automatically set log-bin-trust-routine-creators to 1
(not possible anymore as a user can now switch to stmt-based and do nasty things again), and automatically
set --innodb-locks-unsafe-for-binlog to 1 (was anyway theoretically incorrect as it disabled
phantom protection).
Plus fixes for compiler warnings.
2006-02-25 22:21:03 +01:00
reggie@linux.site
52fbc7a1cd BUG# 17430 Partitoins: crash on SELECT * FROM t1 WHERE f_int1 IS NULL
BUG# 17432: Partitions: wrong result, SELECT ... WHERE <column> is null
2006-02-24 10:10:41 -06:00
reggie@linux.site
cb10b77c31 BUG #15408 - Partitions: subpartition names are not unique 2006-02-21 17:40:07 -06:00
pappa@c-9a08e253.1238-1-64736c10.cust.bredbandsbolaget.se
dd17f48630 Merge c-9a08e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.1-bugs
into  c-9a08e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/wl2826
2006-02-20 16:41:46 -05:00
pappa@c-9a08e253.1238-1-64736c10.cust.bredbandsbolaget.se
d42757f87e WL 2826: Error handling of ALTER TABLE for partitioning
Bug fixes
2006-02-20 16:22:19 -05:00
pappa@c-9a08e253.1238-1-64736c10.cust.bredbandsbolaget.se
6ee7ab8aa3 WL 2826: Error handling of ALTER TABLE for partitioning
Fix compiler issues
2006-02-20 15:07:03 -05:00
reggie@linux.site
1527e94fc8 BUG# 15408 Partitions: subpartition names are not unique
THis patch goes along with 1.2098.23.1 to form the complete patch
2006-02-16 15:02:44 -06:00
reggie@big_geek.
3ce0880d3f Merge reggie@192.168.0.9:/home/reggie/work/mysql-5.1-bug15408
into  big_geek.:C:/Work/mysql/mysql-5.1-bug15408
2006-02-16 11:07:21 -06:00
reggie@big_geek.
466a5bb399 BUG#15408: Partitions: subpartition names are not unique
Also, moved some of the code out of handler.h and into partition specific files for better 
separation.
Also, moved some of the C funcs into partition_info as formal C++ methods
2006-02-16 10:38:33 -06:00
mikron@mikael-ronstr-ms-dator.local
b856931987 WL 2826: Error handling of ALTER TABLE for partitioning
Final part of the error handling of ALTER TABLE for partitioning
2006-02-15 14:05:15 +01:00
mskold@mysql.com
5e4df23c96 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  mysql.com:/usr/local/home/marty/MySQL/mysql-5.1-work
2006-02-15 12:52:30 +01:00
gluh@eagle.intranet.mysql.r18.ru
544a1a98a5 Fix for bug#16907 Partitions: crash, SELECT goes into last partition, UNIQUE INDEX
In presense of subpartitioning use get_part_partition_id() to calculate part_id
2006-02-15 14:34:51 +04:00
mskold@mysql.com
64aa3861a4 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  mysql.com:/usr/local/home/marty/MySQL/mysql-5.1-work
2006-02-15 11:19:45 +01:00
mikron@c-6b09e253.1238-1-64736c10.cust.bredbandsbolaget.se
be8a2ae4be WL 2826: Error handling of ALTER TABLE for partitioning
Started writing detailed error handler of
ALTER TABLE for partitioning.
Philosophical issue, should one always attempt to make recovery
automatic or should one rely on manual means also.
2006-02-15 11:08:08 +01:00
gluh@eagle.intranet.mysql.r18.ru
00fc4cabe5 Fix for bug#16901 Partitions: crash, SELECT, column of part. function=first column of primary key
use part_info->no_subparts to calculate partition range in case of subpartitions
2006-02-15 13:42:43 +04:00
mikron@c-ba0ae253.1238-1-64736c10.cust.bredbandsbolaget.se
26c645d185 WL 2826: Error handling of ALTER TABLE for partitioning
Some more error handling
2006-02-14 17:03:47 +01:00
mskold@mysql.com
dafc2c7aad Post-review fix (WL#2987) 2006-02-14 16:50:51 +01:00
mikron@mikael-ronstr-ms-dator.local
aec1c506a5 WL 2826: Error handling of ALTER TABLE for partitioning
First step for handling errors in ALTER TABLE for partitioning
2006-02-14 14:22:21 +01:00
mikron@mikael-ronstr-ms-dator.local
5b99026ac7 WL 2826: Error handling of ALTER TABLE for partitioning
Added action code for recovery
2006-02-14 11:08:58 +01:00
mikron@mikael-ronstr-ms-dator.local
5a20f2d0b4 WL 2826: Error handling of ALTER TABLE for partitioning
Introduce log entry to handle replace of frm file
2006-02-13 13:52:23 +01:00
pappa@c-9a08e253.1238-1-64736c10.cust.bredbandsbolaget.se
12647d736b Compile fixes 2006-02-11 00:41:52 -05:00
mikron@c-370be253.1238-1-64736c10.cust.bredbandsbolaget.se
10c5b8f3ba WL 2826: Error handling of ALTER TABLE for partitioning
Make lots of fixes to handle the most complex case of reorganising
of partitions where two-phased processes are needed in some cases.
2006-02-10 22:36:01 +01:00
mskold@mysql.com
5c2c52b0cb Added partition pruning checks (WL#2987) 2006-02-10 17:06:24 +01:00
mikron@c-370be253.1238-1-64736c10.cust.bredbandsbolaget.se
d7f164a927 WL 2826: Error handling of ALTER TABLE for partitioning
New function to set exec_log_entry
Moving code outside lock of table log
Fixing some initialisations of list reference to avoid
releasing wrong parts
2006-02-10 12:30:51 +01:00
pappa@c-9a08e253.1238-1-64736c10.cust.bredbandsbolaget.se
ee6508d2ab Bug fixes + debug stuff 2006-02-09 23:57:54 -05:00
pappa@c-9a08e253.1238-1-64736c10.cust.bredbandsbolaget.se
f3c50e9d6b Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.1-wl2826
into  c-9a08e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/wl2826
2006-02-09 21:24:33 -05:00
pappa@c-9a08e253.1238-1-64736c10.cust.bredbandsbolaget.se
9019d89421 WL 2826: Error handling of ALTER TABLE for partitioning
Bug fixes
2006-02-09 21:23:45 -05:00
mikron@c-d10be253.1238-1-64736c10.cust.bredbandsbolaget.se
11bff9edc8 WL 2826: Error handling of ALTER TABLE for partitioning
Error handling
Crash if any error after reaching beyond certain point in
ALTER TABLE processing
2006-02-09 20:25:10 +01:00
mikron@c-d10be253.1238-1-64736c10.cust.bredbandsbolaget.se
aecb004635 WL 2826: Error handling of ALTER TABLE for partitioning
More work on table logging of ALTER TABLE for partitioning
2006-02-09 20:20:22 +01:00
mikron@mikael-ronstr-ms-dator.local
4b6b06fd80 WL 2826: Error handling of ALTER TABLE for partitioning
A little more complete handling
2006-02-09 20:20:21 +01:00
pappa@c-9a08e253.1238-1-64736c10.cust.bredbandsbolaget.se
b290744ce7 WL 2826: Error handling of ALTER TABLE for partitioning
More fixes
2006-02-09 14:20:20 -05:00
pappa@c-9a08e253.1238-1-64736c10.cust.bredbandsbolaget.se
dd59559597 WL 2826: Error handling of ALTER TABLE for partitioning
A number of fixes
2006-02-09 14:13:22 -05:00
mikron@c-e90be253.1238-1-64736c10.cust.bredbandsbolaget.se
d9ef322c5f WL 2826: Error handling for ALTER TABLE for partitioning
Step 14: First version of table log for add/Drop partition
2006-02-09 11:05:05 +01:00
pappa@c-9a08e253.1238-1-64736c10.cust.bredbandsbolaget.se
c12c095226 WL 2826: Error handling for ALTER TABLE for partitioning Step 13
Lots of compilation fixes
2006-02-08 18:04:58 -05:00
tomas@poseidon.ndb.mysql.com
c4c4510a54 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new
2006-02-08 22:15:34 +01:00
tomas@poseidon.ndb.mysql.com
edd1417b46 Bug #17206 Update through VIEW is not working 2006-02-08 18:08:18 +01:00
reggie@linux.site
760bc0a225 bug# 17082 Client hangs when creating tables with partition
This bug was only on Windows but we updated the call to 
create_temporary_file to match what is being done in other
areas of MySQL
2006-02-08 04:05:18 -06:00
reggie@linux.site
824ac10fbc BUG# 17082 - Client hangs when creating tables with partition
no test case needed since simply creating a partitioned table 
reproduces it.
2006-02-07 10:45:11 -06:00
tomas@poseidon.ndb.mysql.com
776bc2a6f2 Bug #17005 Ndb partition handling for create table like is broken 2006-02-07 16:31:20 +01:00
mikron@c-fa09e253.1238-1-64736c10.cust.bredbandsbolaget.se
5091f3a8a5 WL 2826: Step 11
Lots of new code for table log
2006-02-07 10:45:07 +01:00
pappa@c-5c0be253.1238-1-64736c10.cust.bredbandsbolaget.se
da5713e486 WL #2826: Sixth step, made it work with test cases 2006-02-03 12:05:29 -05:00
mikron@mikael-ronstr-ms-dator.local
e222f4d8e7 WL 2826: A third step, fixing generate_partition_syntax 2006-02-01 16:38:08 +01:00
mikron@mikael-ronstr-ms-dator.local
dc4ba14827 WL 2826: Another step 2006-02-01 14:00:00 +01:00
mikron@c-4d08e253.1238-1-64736c10.cust.bredbandsbolaget.se
08e12cada9 WL 2826: First step in error handling of ALTER TABLE for partitioning 2006-02-01 10:06:07 +01:00
knielsen@mysql.com
56d44ff1f9 Merge mysql.com:/usr/local/mysql/mysql-5.1-win-fixes
into  mysql.com:/usr/local/mysql/x/mysql-5.1-new
2006-01-30 17:57:20 +01:00
knielsen@mysql.com
899fc2653d Windows compile fixes in preparation for 5.1.6 beta. 2006-01-30 13:09:08 +01:00
patg@govinda.patg.net
437368e417 WL# 2986
Final patch
-----------

This WL is about using this bitmap in all parts of the partition handler.
Thus for:
rnd_init/rnd_next
index_init/index_next and all other variants of index scans
read_range_... the various range scans implemented in the partition handler.

Also use those bitmaps in the various other calls that currently loop over all
partitions.
2006-01-28 16:22:32 -08:00
reggie@linux.site
8147bbeacd Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  linux.site:/home/reggie/work/mysql-5.1-bug14354
2006-01-25 13:10:00 -06:00
sergefp@mysql.com
8223334008 Compile failure fix for gcc 2.95x: Don't use unnamed union of unnamed
structs in PARTITION_ITERATOR
2006-01-25 06:01:54 +03:00
reggie@linux.site
daa0587c3d bug #14354 - data directory and index directory not working for partitions 2006-01-23 23:20:23 -06:00
sergefp@mysql.com
09004c2a03 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  mysql.com:/home/psergey/mysql-5.1-ppruning-r5
2006-01-19 17:05:57 +03:00
pappa@c-0c0be253.1238-1-64736c10.cust.bredbandsbolaget.se
07e5c13e89 Bug fix 2006-01-18 16:09:25 -05:00
sergefp@mysql.com
c379f6b0ba WL#2985: Merge 2006-01-18 21:29:48 +03:00
sergefp@mysql.com
55380631cc Manual merge 2006-01-18 14:09:08 +03:00
pappa@c-0c0be253.1238-1-64736c10.cust.bredbandsbolaget.se
fb79504889 Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  c-0c0be253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/wl2747-push
2006-01-17 12:35:09 -05:00
pappa@c-0c0be253.1238-1-64736c10.cust.bredbandsbolaget.se
a9ab4f9cb8 Fix for auto-partitioned tables and PARTITION BY KEY() tables 2006-01-17 11:19:48 -05:00
mikron@c-1e0be253.1238-1-64736c10.cust.bredbandsbolaget.se
6bf5c9113d WL #2747: Fix such that backup and restore works for user defined
partitioned tables in NDB
2006-01-17 09:25:12 +01:00
mikron@c-1e0be253.1238-1-64736c10.cust.bredbandsbolaget.se
e802a94284 WL #2604: Partition Management
Optimised version of ADD/DROP/REORGANIZE partitions for
non-NDB storage engines.
New syntax to handle REBUILD/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions
Quite a few bug fixes
2006-01-17 08:40:00 +01:00
reggie@linux.site
3573c2cf47 Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  linux.site:/home/reggie/work/mysql-5.1-bug15968
2006-01-16 15:23:29 -06:00
gluh@eagle.intranet.mysql.r18.ru
be4ebd9038 WL#2506: Information Schema tables for PARTITIONing
added I_S 'PARTITIONS' table
2006-01-10 19:44:04 +04:00
reggie@linux.site
557a68327f Bug# 15968 - Partitions: crash when insert with f1 = -1 into partition by hash(f1)
fixed
2006-01-06 18:52:49 -06:00
sergefp@mysql.com
62942018e1 WL#2985 "Partition-pruning", "range walking" addition: better comments. 2006-01-05 17:47:07 +03:00
sergefp@mysql.com
e40e1003f7 WL#2985 "Partition pruning": Make compilable without partitioning engine. 2006-01-05 03:12:51 +03:00
sergefp@mysql.com
93669bfe0b WL#2985 "Partition Pruning":
- post-...-post review fixes
- Added "integer range walking" that allows to do partition pruning for "a <=? t.field <=? b"
  by finding used partitions for a, a+1, a+2, ..., b-1, b.
2006-01-04 11:09:01 +03:00
sergefp@mysql.com
328f8fa735 WL#2985 "Partition pruning", postreview fixes: Small code fixes and better comments 2005-12-27 15:04:35 +03:00
sergefp@mysql.com
e597607cb8 Merge newbox:mysql-5.1-ppruning-r4
into  pylon.mylan:/home/psergey/mysql-5.1-26dec-merge
2005-12-26 14:56:15 +03:00
sergefp@mysql.com
2a3943dbec WL#2985 "Partition Pruning": post-review fixes:
- Added more comments.
- Added a RANGE_OPT_PARAM::remove_jump_scans flag that disables construction of index_merge
  SEL_TREEs that represent unusable conditions like "key1part1<c1 OR key2part2<c2"
- make prune_partitions() function handle the case where range analysis produces a list of 
  index_merge trees (it turned out that this is possible, appropriate test case added).
- Other small fixes.
2005-12-26 08:40:09 +03:00
sergefp@mysql.com
e1f49888bf WL#2985 "Partition Pruning" 2005-12-22 12:29:00 +03:00
acurtis@xiphis.org
9d4d1e81b8 Merge xiphis.org:/home/antony/work2/mysql-5.1
into  xiphis.org:/home/antony/work3/mysql-5.1-plugable-2
2005-12-21 10:26:39 -08:00
acurtis@xiphis.org
13a776778c Finalize storage engine plugins
Give BerkeleyDB savepoints
Remove "enum db_type" from most of the code
2005-12-21 10:18:40 -08:00
holyfoot@deer.(none)
55e7f4503e bug #15521 (Cannot reorganise a partition with a new name equal to the old name) 2005-12-15 15:24:35 +04:00
kent@mysql.com
6430a4901e Makefile.am:
Distribute "handlerton-win.cc"
mysqld.cc:
  Corrected word lenght for some innobase
  configuration variables
Makefile.am:
  Added Visual Studio 7 project file to EXTRA_DIST
ha_partition.cc, sql_partition.cc:
  Changed include to use "..." for Windows
handlerton-win.cc:
  Handle engine include/exclude with defines for Windows
  new file
2005-11-26 05:35:37 +01:00
mikael@mysql.com
a6c97bb635 Made set_part_info a handler method and not a ha_partition method only
The previous variant where it was a specific ha_partition method
only worked for the partition handler. It was unfortunately called also
for the NDB handler and in this case it called a random method in the
NDB handler with random input.
2005-11-25 09:11:52 +01:00
monty@mysql.com
e42c980967 Table definition cache, part 2
The table opening process now works the following way:
- Create common TABLE_SHARE object
- Read the .frm file and unpack it into the TABLE_SHARE object
- Create a TABLE object based on the information in the TABLE_SHARE
  object and open a handler to the table object

Other noteworthy changes:
- In TABLE_SHARE the most common strings are now LEX_STRING's
- Better error message when table is not found
- Variable table_cache is now renamed 'table_open_cache'
- New variable 'table_definition_cache' that is the number of table defintions that will be cached
- strxnmov() calls are now fixed to avoid overflows
- strxnmov() will now always add one end \0 to result
- engine objects are now created with a TABLE_SHARE object instead of a TABLE object.
- After creating a field object one must call field->init(table) before using it

- For a busy system this change will give you:
 - Less memory usage for table object
 - Faster opening of tables (if it's has been in use or is in table definition cache)
 - Allow you to cache many table definitions objects
 - Faster drop of table
2005-11-23 22:45:02 +02:00
patg@krsna.patg.net
f6cd0148b8 BUG #14524
Patch that fixes crashing when partition uses blackole for 
underlying tables.
2005-11-18 17:02:27 -08:00
reggie@poseidon.ndb.mysql.com
473dac3541 some small changes to help get 5.1 compiling cleanly on Windows and with Visual C++ 2005 2005-11-07 17:15:23 +01:00
acurtis@poseidon.ndb.mysql.com
c01a3b5e5f Make storage engines "pluggable", handlerton work 2005-11-07 16:25:06 +01:00
monty@mysql.com
cdf64f0f57 Fix of crashed 5.1 tree (wrong merge + wrong pullout patch forced us to create a new 5.1 tree)
This is a merge of 5.0 -> 5.1 + some code from old 5.1 tree to get all tests to work and keep the .frm format the same as the old 5.1 tree.
2005-11-05 13:20:35 +02:00
pappa@c-1309e253.1238-1-64736c10.cust.bredbandsbolaget.se
2530fcde11 Handle default engine type better for
partitioned tables
2005-09-20 10:29:59 -04:00
pappa@c-0d08e253.1238-1-64736c10.cust.bredbandsbolaget.se
b636832ba1 Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.1
into  c-0d08e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.1
2005-09-14 18:16:36 -04:00
pappa@c-0d08e253.1238-1-64736c10.cust.bredbandsbolaget.se
1494ef61c7 Bug #13154:
Used AND when modulo should have been used to calculate partition id
for PARTITION BY KEY and SUBPARTITION BY KEY
2005-09-14 18:15:40 -04:00
tulin@dl145c.mysql.com
b127139206 Bug #13179 partition info in mysqldump makes it hard to use dump in different sized cluster 2005-09-14 17:30:23 +02:00
pappa@c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se
4c9216a37b Test to see if my commit emails go through 2005-08-26 21:11:56 -04:00
pappa@c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se
d6f11ee980 Merge 5.0 -> 5.1
Fixes +
Adapted to new name resolution context after WL #2486
2005-08-26 20:56:19 -04:00
pappa@c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se
5e91e260e6 WL #2602, #2603, #2604
Added new syntax for partition management
2005-08-19 10:26:05 -04:00
pappa@c-8b0ae253.1238-1-64736c10.cust.bredbandsbolaget.se
e08a37bcdf BUG #12097 patch 2005-07-22 14:47:05 -04:00
mronstrom@mysql.com
67087e2aa7 Patch for push of wl1354 Partitioning 2005-07-18 13:31:02 +02:00