Commit graph

432 commits

Author SHA1 Message Date
kostja@bodhi.local
b42b416400 Remove unnecessary casts to uchar. The casts are stemming from
the lexer API which internally uses  unsigned char variables to
address its state map. The implementation of the lexer should be
internal to the lexer, and not influence the rest of the code.
2007-03-27 21:09:56 +04: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
antony@ppcg5.local
dc24473cb2 WL#2936
"Server Variables for Plugins"
  Implement support for plugins to declare server variables.
  Demonstrate functionality by removing InnoDB specific code from sql/*
  New feature for HASH - HASH_UNIQUE flag
  New feature for DYNAMIC_ARRAY - initializer accepts preallocated ptr.
  Completed support for plugin reference counting.
2007-03-02 08:43:45 -08:00
monty@mysql.com/narttu.mysql.fi
f0ae3ce9b9 Fixed compiler warnings
Fixed compile-pentium64 scripts
Fixed wrong estimate of update_with_key_prefix in sql-bench
Merge bk-internal.mysql.com:/home/bk/mysql-5.1 into mysql.com:/home/my/mysql-5.1
Fixed unsafe define of uint4korr()
Fixed that --extern works with mysql-test-run.pl
Small trivial cleanups
This also fixes a bug in counting number of rows that are updated when we have many simultanous queries
Move all connection handling and command exectuion main loop from sql_parse.cc to sql_connection.cc
Split handle_one_connection() into reusable sub functions.
Split create_new_thread() into reusable sub functions.
Added thread_scheduler; Preliminary interface code for future thread_handling code.

Use 'my_thread_id' for internal thread id's
Make thr_alarm_kill() to depend on thread_id instead of thread
Make thr_abort_locks_for_thread() depend on thread_id instead of thread
In store_globals(), set my_thread_var->id to be thd->thread_id.
Use my_thread_var->id as basis for my_thread_name()
The above changes makes the connection we have between THD and threads more soft.

Added a lot of DBUG_PRINT() and DBUG_ASSERT() functions
Fixed compiler warnings
Fixed core dumps when running with --debug
Removed setting of signal masks (was never used)
Made event code call pthread_exit() (portability fix)
Fixed that event code doesn't call DBUG_xxx functions before my_thread_init() is called.
Made handling of thread_id and thd->variables.pseudo_thread_id uniform.
Removed one common 'not freed memory' warning from mysqltest
Fixed a couple of usage of not initialized warnings (unlikely cases)
Suppress compiler warnings from bdb and (for the moment) warnings from ndb
2007-02-23 13:13:55 +02:00
monty@mysql.com/narttu.mysql.fi
410fc81a72 After merge fixes
Removed a lot of compiler warnings
Removed not used variables, functions and labels
Initialize some variables that could be used unitialized (fatal bugs)
%ll -> %l
2007-01-29 01:47:35 +02:00
holyfoot/hf@deer.(none)
ebc89b9816 Merge mysql.com:/home/hf/work/24502/my51-24502
into  mysql.com:/home/hf/work/mysql-5.1-mrg
2007-01-10 16:23:54 +04:00
kent@mysql.com/kent-amd64.(none)
1e3237fefa Many files:
Changed header to GPL version 2 only
2006-12-27 02:23:51 +01: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
monty@mysql.com/narttu.mysql.fi
3a35c30027 Fixed compiler warnings (Mostly VC++):
- Removed not used variables
- Changed some ulong parameters/variables to ulonglong (possible serious bug)
- Added casts to get rid of safe assignment from longlong to long (and similar)
- Added casts to function parameters
- Fixed signed/unsigned compares
- Added some constructores to structures
- Removed some not portable constructs

Better fix for bug Bug #21428 "skipped 9 bytes from file: socket (3)" on "mysqladmin shutdown"
(Added new parameter to net_clear() to define when we want the communication buffer to be emptied)
2006-11-30 03:40:42 +02:00
monty@mysql.com/nosik.monty.fi
fa81a82e7f Fixed a LOT of compiler warnings
Added missing DBUG_RETURN statements (in mysqldump.c)
Added missing enums
Fixed a lot of wrong DBUG_PRINT() statements, some of which could cause crashes
Removed usage of %lld and %p in printf strings as these are not portable or produces different results on different systems.
2006-11-27 01:47:38 +02: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
mikael/pappa@dator5.(none)
1cdf82e012 BUG#18198: Partition function handling
Fixes of after review fixes
2006-10-02 15:52:29 -04:00
mikael/pappa@dator5.(none)
74c7f60d45 Bug fix 2006-10-02 05:54:30 -04:00
mikael/pappa@dator5.(none)
81248942b7 BUG#18198: Partition function handling
Review fixes
2006-09-30 17:38:15 -04:00
dlenev@mockturtle.local
93fed182eb Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  mockturtle.local:/home/dlenev/src/mysql-5.1-bg20670
2006-09-30 00:31:33 +04:00
mikael/pappa@dator5.(none)
6be97e4e43 Final step of Take 7 on review fixes of this
fairly complex bug
2006-09-26 16:30:39 -04:00
mikael/pappa@dator5.(none)
de9001d3c4 Merge dator5.(none):/home/pappa/clean-mysql-5.1
into  dator5.(none):/home/pappa/bug18198
2006-09-26 01:49:14 -04:00
mikael/pappa@dator5.(none)
0d4d06fd6c Fixed bugs in check_part_func_fields 2006-09-26 01:38:17 -04:00
dlenev@mockturtle.local
5f149dde09 Fix for bug#20670 "UPDATE using key and invoking trigger that modifies
this key does not stop" (5.1 version).

UPDATE statement which WHERE clause used key and which invoked trigger
that modified field in this key worked indefinetely.

This problem occured because in cases when UPDATE statement was
executed in update-on-the-fly mode (in which row is updated right
during evaluation of select for WHERE clause) the new version of
the row became visible to select representing WHERE clause and was
updated again and again.
We already solve this problem for UPDATE statements which does not
invoke triggers by detecting the fact that we are going to update
field in key used for scanning and performing update in two steps,
during the first step we gather information about the rows to be
updated and then doing actual updates. We also do this for
MULTI-UPDATE and in its case we even detect situation when such
fields are updated in triggers (actually we simply assume that
we always update fields used in key if we have before update
trigger).

The fix simply extends this check which is done with help of
check_if_key_used()/QUICK_SELECT_I::check_if_keys_used()
routine/method in such way that it also detects cases when
field used in key is updated in trigger. We do this by
changing check_if_key_used() to take field bitmap instead
field list as argument and passing TABLE::write_set
to it (we also have to add info about fields used in
triggers to this bitmap a bit earlier).
As nice side-effect we have more precise and thus more optimal
perfomance-wise check for the MULTI-UPDATE.
Also check_if_key_used() routine and similar method were renamed
to is_key_used()/is_keys_used() in order to better reflect that
it is simple boolean predicate.
Finally, partition_key_modified() routine now also takes field
bitmap instead of field list as argument.
2006-09-21 13:39:29 +04:00
brian@zim.(none)
7194b6d75a This changes the order of the universe, black is now the new white.
In practice this means that handlerton is now created by the server and is passed to the engine. Plugin startups can now also control how plugins are inited (and can optionally pass values). Bit more flexibility to those who want to write plugin interfaces to the database.
2006-09-15 10:28:00 -07:00
mikael/pappa@dator5.(none)
295d50b23d BUG#21658: Crash partition test in prepared statement protocol
Review fixes
2006-08-31 04:16:22 -04:00
mikael/pappa@dator5.(none)
3b9f4a616c Merge dator5.(none):/home/pappa/clean-mysql-5.1
into  dator5.(none):/home/pappa/bug18198
2006-08-26 06:18:41 -04:00
mikael/pappa@dator5.(none)
b28a550eb4 Merge dator5.(none):/home/pappa/clean-mysql-5.1-kt
into  dator5.(none):/home/pappa/bug21388
2006-08-26 06:14:05 -04:00
mikael/pappa@dator5.(none)
eaf68858ce BUG#21658: Crash when creating table with item in prepared statement that allocates memory in fix_fields
We need to use an arena to indicate we are preparing a statement when loading partition function and
parsing it as part of an open table.
2006-08-22 16:52:25 -04:00
andrey@example.com
30b4a45998 Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  example.com:/work/mysql-5.1-runtime
2006-08-17 19:09:55 +02:00
andrey@example.com
081b865936 Cleanup patch.
There is an existing macros for initializing LEX_STRINGs
with constant strings -> C_STRING_WITH_LEN. Change existing code to use it.
(char *) STRING_WITH_LEN -> C_STRING_WITH_LEN
2006-08-17 18:13:45 +02:00
mikael/pappa@dator5.(none)
a6df8abf2c Merge dator5.(none):/home/pappa/bug21143
into  dator5.(none):/home/pappa/bug21388
2006-08-16 10:53:20 -04:00
mikael/pappa@dator5.(none)
9ba77eb876 Merge dator5.(none):/home/pappa/clean-mysql-5.1
into  dator5.(none):/home/pappa/bug21388
2006-08-16 10:36:01 -04:00
patg@govinda.patg.net
4371749996 Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-5.1
into  govinda.patg.net:/home/patg/mysql-build/mysql-5.1-engines-merge
2006-08-10 14:28:39 -07:00
mikael/pappa@dator5.(none)
79ab9cef27 BUG#21143: mysqld hangs when using wrong number of subpartitions
Rewrote if-statement a bit shorter
Added check for subpartitions in REORGANIZE partitions to be of same number as
in base table.
2006-08-08 08:52:51 -04:00
mikael/pappa@dator5.(none)
db2c48b08d BUG#21339: Crash at EXPLAIN PARTITIONS
Caused by missing check for end of partitions in prune range check
2006-08-05 16:12:24 -04:00
ingo/istruewing@chilla.local
c20030ef26 Merge istruewing@bk-internal.mysql.com:/home/bk/mysql-5.1-engines
into  chilla.local:/home/mydev/mysql-5.1-bug18775
2006-08-02 18:10:51 +02:00
ingo/istruewing@chilla.local
8e4c36ad4a Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)

The intermediate (not temporary) files of the new table
during ALTER TABLE was visible for SHOW TABLES. These
intermediate files are copies of the original table with
the changes done by ALTER TABLE. After all the data is
copied over from the original table, these files are renamed 
to the original tables file names. So they are not temporary 
files. They persist after ALTER TABLE, but just with another 
name.

In 5.0 the intermediate files are invisible for SHOW TABLES
because all file names beginning with "#sql" were suppressed.

This failed since 5.1.6 because even temporary table names were
converted when making file names from them. The prefix became
converted to "@0023sql". Converting the prefix during SHOW TABLES
would suppress the listing of user tables that start with "#sql".

The solution of the problem is to continue the implementation of
the table name to file name conversion feature. One requirement
is to suppress the conversion for temporary table names.

This change is straightforward for real temporary tables as there
is a function that creates temporary file names.

But the generated path names are located in TMPDIR and have no
relation to the internal table name. This cannot be used for
ALTER TABLE. Its intermediate files need to be in the same
directory as the old table files. And it is necessary to be
able to deduce the same path from the same table name repeatedly.

Consequently the intermediate table files must be handled like normal
tables. Their internal names shall start with tmp_file_prefix
(#sql) and they shall not be converted like normal table names.

I added a flags parameter to all relevant functions that are
called from ALTER TABLE. It is used to suppress the conversion
for the intermediate table files.

The outcome is that the suppression of #sql in SHOW TABLES
works again. It does not suppress user tables as these are
converted to @0023sql on file level.

This patch does also fix ALTER TABLE ... RENAME, which could not 
rename a table with non-ASCII characters in its name.

It does also fix the problem that a user could create a table like
`#sql-xxxx-yyyy`, where xxxx is mysqld's pid and yyyy is the thread
ID of some other thread, which prevented this thread from running 
ALTER TABLE.

Some of the above problems are mentioned in Bug 1405, which can
be closed with this patch.

This patch does also contain some minor fixes for other forgotten
conversions. Still known problems are reported as bugs 21370,
21373, and 21387.
2006-08-02 17:57:06 +02:00
mikael/pappa@dator5.(none)
fbd15d253d Merge dator5.(none):/home/pappa/clean-mysql-5.1
into  dator5.(none):/home/pappa/bug18198
2006-08-02 07:01:38 -04:00
mikael/pappa@dator5.(none)
6425e33530 BUG#18198: Fixes to handle VARCHAR strings properly
New methods to handle VARCHAR strings and CHAR's which are not
using a binary collation.
Indentation fixes
Now strings are run through strnxfrm before they are processed
by the partition function
We do not allow collations where strnxfrm expands the string since
we want the resulting string to fit in the same value range as
the original.
2006-08-02 06:40:25 -04:00
mikael/pappa@dator5.(none)
23cb067aa2 BUG#18198: More fixes 2006-07-31 11:38:09 -04:00
mikael/pappa@dator5.(none)
d870e35508 Merge dator5.(none):/home/pappa/clean-mysql-5.1
into  dator5.(none):/home/pappa/bug18198
2006-07-31 05:42:06 -04:00
evgen@sunlight.local
8cd88a9179 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.1
into  sunlight.local:/local_work/tmp_merge-5.1-opt-mysql
2006-07-29 23:54:55 +04:00
sergefp@mysql.com
e7db9d4545 BUG#20257: Fix partition pruning for BIGINT UNSIGNED:
- Fix problems in the "Interval walking" partition interval analyzer.
2006-07-24 21:58:11 +04:00
mikael/pappa@dator5.(none)
032d208be2 BUG#18198: Partition function handling
Review fixes
2006-07-21 10:23:32 -04:00
mikael/pappa@dator5.(none)
cef004845c BUG20733: Bug in partition pruning with zerofill field
Problem was with handling NULL values in ranges
2006-07-20 05:28:16 -04:00
mikael/pappa@dator5.(none)
eae8c963c5 Merge mronstrom@bk-internal.mysql.com:/home/bk/bugs/bug18198
into  dator5.(none):/home/pappa/bug18198
2006-07-12 11:33:22 -04:00
gluh@eagle.intranet.mysql.r18.ru
3e22ea44e5 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.1
into mysql.com:/home/gluh/MySQL/Merge/5.1-kt
2006-06-28 11:55:15 +05:00
tomas@poseidon.ndb.mysql.com
9791d53445 partition functions to pass create_info, not only max_rows 2006-06-27 22:19:27 +02:00
mikael@dator5.(none)
5771a711f0 BUG#18198: Less flexibility in defining partition functions
Changed test for functions if they are supported.
3 categories:
1) Fully supported
2) Supported for single character collations
3) Supported for binary collations
2006-06-23 01:21:26 -04:00
bar@mysql.com
bfae7303d7 Bug#20086: Can't get data from key partitioned tables with VARCHAR key
The problem appeared because the same values produced different hash
during INSERT and SELECT for VARCHAR data type.
Fix:
VARCHAR required special treatment to avoid hashing of length bytes
(leftmost one or two bytes) as well as trailing bytes beyond real length,
which could contain garbage. Fix is done by introducing hash() - new method
in the Field class.
2006-06-21 13:00:19 +05:00
mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se
8484ea8b04 Merge c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug19801
into  c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug16002
2006-06-14 09:22:27 -04:00
mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se
e91454f89e Merge c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/clean-mysql-5.1
into  c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug16002
2006-06-14 09:12:07 -04:00
mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se
b51515c998 Merge c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/clean-mysql-5.1
into  c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug19801
2006-06-14 08:51:39 -04:00
mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se
2dd6099092 BUG#16002: Unsigned partition function support
After review fix
2006-06-14 08:31:38 -04:00
mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se
6d519a2370 Merge c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/clean-mysql-5.1
into  c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug19307
2006-06-13 21:41:02 -04:00
mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se
59c0034061 BUG#19307: CSV engine can cause crashes in partitioned tables (due to its conversion of NULLs to 0) 2006-06-13 14:36:23 -04:00
mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se
192033c7a2 Merge c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug19122
into  c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug19305
2006-06-12 17:49:38 -04:00
mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se
44076b96a1 Merge c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/clean-mysql-5.1
into  c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug19122
2006-06-12 17:41:05 -04:00
mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se
92dec44ef9 BUG#19122: Need to close handlers before drop/rename phase
Fixed comments
2006-06-12 17:37:32 -04:00
mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se
30817b8900 BUG#19122: Need to close all handlers before rename/drop phase in ALTER TABLE ADD/DROP/REORGANIZE partitions
After review fix
2006-06-12 17:30:32 -04:00
mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se
334a28f9f5 Merge c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug19695
into  c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug19305
2006-06-12 14:50:46 -04:00
mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se
744bb5d7bb Merge c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/clean-mysql-5.1
into  c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug19695
2006-06-12 14:42:07 -04:00
mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se
9aa3af6723 Merge c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/clean-mysql-5.1
into  c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug19305
2006-06-12 14:31:25 -04:00
mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se
d4c8576e46 BUG#16002: After review fixes
Fixes for NDB
2006-06-06 13:19:46 -04:00
mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se
bda7c1fd13 BUG#16002: More review fixes 2006-06-06 11:54:21 -04:00
mikael@c-7308e253.1238-1-64736c10.cust.bredbandsbolaget.se
64ca16506b BUG#16002: Handle unsigned integer partition functions 2006-06-05 14:55:22 -04:00
monty@mysql.com
c46fb742b8 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  mysql.com:/home/my/mysql-5.1
2006-06-04 21:05:22 +03:00
monty@mysql.com
74cc73d461 This changeset is largely a handler cleanup changeset (WL#3281), but includes fixes and cleanups that was found necessary while testing the handler changes
Changes that requires code changes in other code of other storage engines.
(Note that all changes are very straightforward and one should find all issues
by compiling a --debug build and fixing all compiler errors and all
asserts in field.cc while running the test suite),

- New optional handler function introduced: reset()
  This is called after every DML statement to make it easy for a handler to
  statement specific cleanups.
  (The only case it's not called is if force the file to be closed)

- handler::extra(HA_EXTRA_RESET) is removed. Code that was there before
  should be moved to handler::reset()

- table->read_set contains a bitmap over all columns that are needed
  in the query.  read_row() and similar functions only needs to read these
  columns
- table->write_set contains a bitmap over all columns that will be updated
  in the query. write_row() and update_row() only needs to update these
  columns.
  The above bitmaps should now be up to date in all context
  (including ALTER TABLE, filesort()).

  The handler is informed of any changes to the bitmap after
  fix_fields() by calling the virtual function
  handler::column_bitmaps_signal(). If the handler does caching of
  these bitmaps (instead of using table->read_set, table->write_set),
  it should redo the caching in this code. as the signal() may be sent
  several times, it's probably best to set a variable in the signal
  and redo the caching on read_row() / write_row() if the variable was
  set.

- Removed the read_set and write_set bitmap objects from the handler class

- Removed all column bit handling functions from the handler class.
  (Now one instead uses the normal bitmap functions in my_bitmap.c instead
  of handler dedicated bitmap functions)

- field->query_id is removed. One should instead instead check
  table->read_set and table->write_set if a field is used in the query.

- handler::extra(HA_EXTRA_RETRIVE_ALL_COLS) and
  handler::extra(HA_EXTRA_RETRIEVE_PRIMARY_KEY) are removed. One should now
  instead use table->read_set to check for which columns to retrieve.

- If a handler needs to call Field->val() or Field->store() on columns
  that are not used in the query, one should install a temporary
  all-columns-used map while doing so. For this, we provide the following
  functions:

  my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->read_set);
  field->val();
  dbug_tmp_restore_column_map(table->read_set, old_map);

  and similar for the write map:

  my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->write_set);
  field->val();
  dbug_tmp_restore_column_map(table->write_set, old_map);

  If this is not done, you will sooner or later hit a DBUG_ASSERT
  in the field store() / val() functions.
  (For not DBUG binaries, the dbug_tmp_restore_column_map() and
  dbug_tmp_restore_column_map() are inline dummy functions and should
  be optimized away be the compiler).

- If one needs to temporary set the column map for all binaries (and not
  just to avoid the DBUG_ASSERT() in the Field::store() / Field::val()
  methods) one should use the functions tmp_use_all_columns() and
  tmp_restore_column_map() instead of the above dbug_ variants.

- All 'status' fields in the handler base class (like records,
  data_file_length etc) are now stored in a 'stats' struct. This makes
  it easier to know what status variables are provided by the base
  handler.  This requires some trivial variable names in the extra()
  function.

- New virtual function handler::records().  This is called to optimize
  COUNT(*) if (handler::table_flags() & HA_HAS_RECORDS()) is true.
  (stats.records is not supposed to be an exact value. It's only has to
  be 'reasonable enough' for the optimizer to be able to choose a good
  optimization path).

- Non virtual handler::init() function added for caching of virtual
  constants from engine.

- Removed has_transactions() virtual method. Now one should instead return
  HA_NO_TRANSACTIONS in table_flags() if the table handler DOES NOT support
  transactions.

- The 'xxxx_create_handler()' function now has a MEM_ROOT_root argument
  that is to be used with 'new handler_name()' to allocate the handler
  in the right area.  The xxxx_create_handler() function is also
  responsible for any initialization of the object before returning.

  For example, one should change:

  static handler *myisam_create_handler(TABLE_SHARE *table)
  {
    return new ha_myisam(table);
  }

  ->

  static handler *myisam_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root)
  {
    return new (mem_root) ha_myisam(table);
  }

- New optional virtual function: use_hidden_primary_key().
  This is called in case of an update/delete when
  (table_flags() and HA_PRIMARY_KEY_REQUIRED_FOR_DELETE) is defined
  but we don't have a primary key. This allows the handler to take precisions
  in remembering any hidden primary key to able to update/delete any
  found row. The default handler marks all columns to be read.

- handler::table_flags() now returns a ulonglong (to allow for more flags).

- New/changed table_flags()
  - HA_HAS_RECORDS	    Set if ::records() is supported
  - HA_NO_TRANSACTIONS	    Set if engine doesn't support transactions
  - HA_PRIMARY_KEY_REQUIRED_FOR_DELETE
                            Set if we should mark all primary key columns for
			    read when reading rows as part of a DELETE
			    statement. If there is no primary key,
			    all columns are marked for read.
  - HA_PARTIAL_COLUMN_READ  Set if engine will not read all columns in some
			    cases (based on table->read_set)
 - HA_PRIMARY_KEY_ALLOW_RANDOM_ACCESS
   			    Renamed to HA_PRIMARY_KEY_REQUIRED_FOR_POSITION.
 - HA_DUPP_POS              Renamed to HA_DUPLICATE_POS
 - HA_REQUIRES_KEY_COLUMNS_FOR_DELETE
			    Set this if we should mark ALL key columns for
			    read when when reading rows as part of a DELETE
			    statement. In case of an update we will mark
			    all keys for read for which key part changed
			    value.
  - HA_STATS_RECORDS_IS_EXACT
			     Set this if stats.records is exact.
			     (This saves us some extra records() calls
			     when optimizing COUNT(*))
			    

- Removed table_flags()
  - HA_NOT_EXACT_COUNT     Now one should instead use HA_HAS_RECORDS if
			   handler::records() gives an exact count() and
			   HA_STATS_RECORDS_IS_EXACT if stats.records is exact.
  - HA_READ_RND_SAME	   Removed (no one supported this one)

- Removed not needed functions ha_retrieve_all_cols() and ha_retrieve_all_pk()

- Renamed handler::dupp_pos to handler::dup_pos

- Removed not used variable handler::sortkey


Upper level handler changes:

- ha_reset() now does some overall checks and calls ::reset()
- ha_table_flags() added. This is a cached version of table_flags(). The
  cache is updated on engine creation time and updated on open.


MySQL level changes (not obvious from the above):

- DBUG_ASSERT() added to check that column usage matches what is set
  in the column usage bit maps. (This found a LOT of bugs in current
  column marking code).

- In 5.1 before, all used columns was marked in read_set and only updated
  columns was marked in write_set. Now we only mark columns for which we
  need a value in read_set.

- Column bitmaps are created in open_binary_frm() and open_table_from_share().
  (Before this was in table.cc)

- handler::table_flags() calls are replaced with handler::ha_table_flags()

- For calling field->val() you must have the corresponding bit set in
  table->read_set. For calling field->store() you must have the
  corresponding bit set in table->write_set. (There are asserts in
  all store()/val() functions to catch wrong usage)

- thd->set_query_id is renamed to thd->mark_used_columns and instead
  of setting this to an integer value, this has now the values:
  MARK_COLUMNS_NONE, MARK_COLUMNS_READ, MARK_COLUMNS_WRITE
  Changed also all variables named 'set_query_id' to mark_used_columns.

- In filesort() we now inform the handler of exactly which columns are needed
  doing the sort and choosing the rows.

- The TABLE_SHARE object has a 'all_set' column bitmap one can use
  when one needs a column bitmap with all columns set.
  (This is used for table->use_all_columns() and other places)

- The TABLE object has 3 column bitmaps:
  - def_read_set     Default bitmap for columns to be read
  - def_write_set    Default bitmap for columns to be written
  - tmp_set          Can be used as a temporary bitmap when needed.
  The table object has also two pointer to bitmaps read_set and write_set
  that the handler should use to find out which columns are used in which way.

- count() optimization now calls handler::records() instead of using
  handler->stats.records (if (table_flags() & HA_HAS_RECORDS) is true).

- Added extra argument to Item::walk() to indicate if we should also
  traverse sub queries.

- Added TABLE parameter to cp_buffer_from_ref()

- Don't close tables created with CREATE ... SELECT but keep them in
  the table cache. (Faster usage of newly created tables).


New interfaces:

- table->clear_column_bitmaps() to initialize the bitmaps for tables
  at start of new statements.

- table->column_bitmaps_set() to set up new column bitmaps and signal
  the handler about this.

- table->column_bitmaps_set_no_signal() for some few cases where we need
  to setup new column bitmaps but don't signal the handler (as the handler
  has already been signaled about these before). Used for the momement
  only in opt_range.cc when doing ROR scans.

- table->use_all_columns() to install a bitmap where all columns are marked
  as use in the read and the write set.

- table->default_column_bitmaps() to install the normal read and write
  column bitmaps, but not signaling the handler about this.
  This is mainly used when creating TABLE instances.

- table->mark_columns_needed_for_delete(),
  table->mark_columns_needed_for_delete() and
  table->mark_columns_needed_for_insert() to allow us to put additional
  columns in column usage maps if handler so requires.
  (The handler indicates what it neads in handler->table_flags())

- table->prepare_for_position() to allow us to tell handler that it
  needs to read primary key parts to be able to store them in
  future table->position() calls.
  (This replaces the table->file->ha_retrieve_all_pk function)

- table->mark_auto_increment_column() to tell handler are going to update
  columns part of any auto_increment key.

- table->mark_columns_used_by_index() to mark all columns that is part of
  an index.  It will also send extra(HA_EXTRA_KEYREAD) to handler to allow
  it to quickly know that it only needs to read colums that are part
  of the key.  (The handler can also use the column map for detecting this,
  but simpler/faster handler can just monitor the extra() call).

- table->mark_columns_used_by_index_no_reset() to in addition to other columns,
  also mark all columns that is used by the given key.

- table->restore_column_maps_after_mark_index() to restore to default
  column maps after a call to table->mark_columns_used_by_index().

- New item function register_field_in_read_map(), for marking used columns
  in table->read_map. Used by filesort() to mark all used columns

- Maintain in TABLE->merge_keys set of all keys that are used in query.
  (Simplices some optimization loops)

- Maintain Field->part_of_key_not_clustered which is like Field->part_of_key
  but the field in the clustered key is not assumed to be part of all index.
  (used in opt_range.cc for faster loops)

-  dbug_tmp_use_all_columns(), dbug_tmp_restore_column_map()
   tmp_use_all_columns() and tmp_restore_column_map() functions to temporally
   mark all columns as usable.  The 'dbug_' version is primarily intended
   inside a handler when it wants to just call Field:store() & Field::val()
   functions, but don't need the column maps set for any other usage.
   (ie:: bitmap_is_set() is never called)

- We can't use compare_records() to skip updates for handlers that returns
  a partial column set and the read_set doesn't cover all columns in the
  write set. The reason for this is that if we have a column marked only for
  write we can't in the MySQL level know if the value changed or not.
  The reason this worked before was that MySQL marked all to be written
  columns as also to be read. The new 'optimal' bitmaps exposed this 'hidden
  bug'.

- open_table_from_share() does not anymore setup temporary MEM_ROOT
  object as a thread specific variable for the handler. Instead we
  send the to-be-used MEMROOT to get_new_handler().
  (Simpler, faster code)



Bugs fixed:

- Column marking was not done correctly in a lot of cases.
  (ALTER TABLE, when using triggers, auto_increment fields etc)
  (Could potentially result in wrong values inserted in table handlers
  relying on that the old column maps or field->set_query_id was correct)
  Especially when it comes to triggers, there may be cases where the
  old code would cause lost/wrong values for NDB and/or InnoDB tables.

- Split thd->options flag OPTION_STATUS_NO_TRANS_UPDATE to two flags:
  OPTION_STATUS_NO_TRANS_UPDATE and OPTION_KEEP_LOG.
  This allowed me to remove some wrong warnings about:
  "Some non-transactional changed tables couldn't be rolled back"

- Fixed handling of INSERT .. SELECT and CREATE ... SELECT that wrongly reset
  (thd->options & OPTION_STATUS_NO_TRANS_UPDATE) which caused us to loose
  some warnings about
  "Some non-transactional changed tables couldn't be rolled back")

- Fixed use of uninitialized memory in ha_ndbcluster.cc::delete_table()
  which could cause delete_table to report random failures.

- Fixed core dumps for some tests when running with --debug

- Added missing FN_LIBCHAR in mysql_rm_tmp_tables()
  (This has probably caused us to not properly remove temporary files after
  crash)

- slow_logs was not properly initialized, which could maybe cause
  extra/lost entries in slow log.

- If we get an duplicate row on insert, change column map to read and
  write all columns while retrying the operation. This is required by
  the definition of REPLACE and also ensures that fields that are only
  part of UPDATE are properly handled.  This fixed a bug in NDB and
  REPLACE where REPLACE wrongly copied some column values from the replaced
  row.

- For table handler that doesn't support NULL in keys, we would give an error
  when creating a primary key with NULL fields, even after the fields has been
  automaticly converted to NOT NULL.

- Creating a primary key on a SPATIAL key, would fail if field was not
  declared as NOT NULL.


Cleanups:

- Removed not used condition argument to setup_tables

- Removed not needed item function reset_query_id_processor().

- Field->add_index is removed. Now this is instead maintained in
  (field->flags & FIELD_IN_ADD_INDEX)

- Field->fieldnr is removed (use field->field_index instead)

- New argument to filesort() to indicate that it should return a set of
  row pointers (not used columns). This allowed me to remove some references
  to sql_command in filesort and should also enable us to return column
  results in some cases where we couldn't before.

- Changed column bitmap handling in opt_range.cc to be aligned with TABLE
  bitmap, which allowed me to use bitmap functions instead of looping over
  all fields to create some needed bitmaps. (Faster and smaller code)

- Broke up found too long lines

- Moved some variable declaration at start of function for better code
  readability.

- Removed some not used arguments from functions.
  (setup_fields(), mysql_prepare_insert_check_table())

- setup_fields() now takes an enum instead of an int for marking columns
   usage.

- For internal temporary tables, use handler::write_row(),
  handler::delete_row() and handler::update_row() instead of
  handler::ha_xxxx() for faster execution.

- Changed some constants to enum's and define's.

- Using separate column read and write sets allows for easier checking
  of timestamp field was set by statement.

- Remove calls to free_io_cache() as this is now done automaticly in ha_reset()

- Don't build table->normalized_path as this is now identical to table->path
  (after bar's fixes to convert filenames)

- Fixed some missed DBUG_PRINT(.."%lx") to use "0x%lx" to make it easier to
  do comparision with the 'convert-dbug-for-diff' tool.


Things left to do in 5.1:

- We wrongly log failed CREATE TABLE ... SELECT in some cases when using
  row based logging (as shown by testcase binlog_row_mix_innodb_myisam.result)
  Mats has promised to look into this.

- Test that my fix for CREATE TABLE ... SELECT is indeed correct.
  (I added several test cases for this, but in this case it's better that
  someone else also tests this throughly).
  Lars has promosed to do this.
2006-06-04 18:52:22 +03:00
mikael@c-3d08e253.1238-1-64736c10.cust.bredbandsbolaget.se
b615e0b6dc BUG#19067: Crash for default subpartitioning when altering the table 2006-06-03 18:37:31 -04:00
mikael@c-3d08e253.1238-1-64736c10.cust.bredbandsbolaget.se
a49ab68975 Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  c-3d08e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug19067
2006-06-03 12:57:32 -04:00
sergefp@mysql.com
995bb87d9c get_[part_]partition_id(): Fix function comments. 2006-06-03 04:03:26 +04:00
mikael@c-3d08e253.1238-1-64736c10.cust.bredbandsbolaget.se
31665cb561 Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  c-3d08e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug18198
2006-05-31 18:24:34 -04:00
serg@sergbook.mysql.com
2e16f1eccc after review fixes 2006-05-31 18:07:32 +02:00
mikael@c-3d08e253.1238-1-64736c10.cust.bredbandsbolaget.se
9686e7bfc9 BUG#20161: LINEAR keyword on subpartitions not displayed in information schema for partitions
and in SHOW CREATE TABLE
2006-05-31 09:33:10 -04:00
mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se
d3ea79ff52 BUG#19801: Valgrind error in check_list_constants
Needed some special handling of the case when no_list_values == 0
2006-05-30 00:08:48 -04:00
serg@sergbook.mysql.com
fe97dbb587 handlerton cleanup:
duplicate fields removed, st_mysql_storage_engine added to support
run-time handlerton initialization (no compiler warnings), handler API
is now tied to MySQL version, handlerton->plugin mapping added
(slot-based), dummy default_hton removed, plugin-type-specific
initialization generalized, built-in plugins are now initialized too,
--default-storage-engine no longer needs a list of storage engines
in handle_options().

mysql-test-run.pl bugfixes
2006-05-28 14:51:01 +02:00
mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se
cdc9025e0e Merge c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/clean-mysql-5.1-new
into  c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug19122
2006-05-27 17:38:04 -04:00
mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se
bd349cff14 BUG#19695: Showed partition options when table options were not shown 2006-05-27 17:36:45 -04:00
mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se
10a7660f94 BUG#19305: COALESCE partition left partition files undropped 2006-05-27 16:34:13 -04:00
mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se
90c415ffcd BUG#19122: MySQL Server crashes when ALTER TABLE t1 REBUILD PARTITION on InnoDB table 2006-05-26 18:44:52 -04:00
mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se
640a4de065 Merge c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug19140
into  c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug19010
2006-05-12 15:44:15 -04:00
mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se
c85be97f50 Merge c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/clean-mysql-5.1-new
into  c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug19010
2006-05-12 12:22:31 -04:00
mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se
5de2150b85 Merge c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/clean-mysql-5.1-new
into  c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug19067
2006-05-11 16:03:12 -04:00
mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se
56b97747de BUG#19010: Fix issues with that ALTER TABLE from auto-partitioned NDB table doesn't work unless primary key exists on table. 2006-05-10 12:53:40 -04:00
mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se
b8227de1bf BUG#19140: Create index caused crash 2006-05-08 21:41:10 -04:00
monty@mysql.com
c10f37673c Fixed compiler warnings
Move plugin declarations after system functions have been checked
(Fixes problem with ndb_config failing becasue SHM is not declared)
Fixed some memory leaks
2006-05-04 19:39:47 +03:00
mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se
33eccd0c1e WL 2826: Error handling of ALTER TABLE for partitioning
Fixed merge issue
2006-04-22 04:38:19 -04:00
mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se
c949342101 Merge mronstrom@bk-internal.mysql.com:/home/bk/bugs/bug16002
into  c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug16002
2006-04-21 09:52:51 -04:00
mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se
82dfff9d08 BUG#19067: Crash when ALTER TABLE for default subpartitioned table 2006-04-21 08:43:07 -04:00
mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se
570c74e456 BUG#19067: Alter table add partition for subpartitioned table crashes
Changed variable name for improved clarity and debugging possibilities
Fixed bug in not assigning subpart_type
2006-04-20 14:11:54 -04:00
mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se
09e95da616 Merge c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/clean-mysql-5.1-new
into  c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/wl2826
2006-04-19 21:22:35 -04:00
mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se
dd257b22dc WL 2826: Error handling of ALTER TABLE for partitioning
Various bug fixes (mostly mixed to and from in replace methods)
2006-04-19 20:04:00 -04:00
mikron@c-ae09e253.1238-1-64736c10.cust.bredbandsbolaget.se
eb60344d78 WL 2826: Error handling of ALTER TABLE for partitioning
Use \0 to indicate frm-file
Add more comments
Add more #ifdef code missing previously
2006-04-18 16:58:12 +02:00
mikael@c-4909e253.1238-1-64736c10.cust.bredbandsbolaget.se
cef06fdb61 BUG#16002: Make partition functions that are unsigned work properly 2006-04-17 22:51:34 -04:00
mikael@c-4908e253.1238-1-64736c10.cust.bredbandsbolaget.se
8ae26a2868 WL 2826: Error handling of ALTER TABLE for partitioning
After review changes
2006-04-15 21:49:13 -04:00
mikael@c-4908e253.1238-1-64736c10.cust.bredbandsbolaget.se
84575fe0ba BUG#18750: Various problems with partition names, quotation marks 2006-04-10 13:48:58 -04:00
sergefp@mysql.com
68bd945ca3 BUG#18558 "Partition pruning results are incorrect for certain class of WHERE clauses" :
* Produce right results for conditions that were transformed to "(partitioning_range) AND
  (list_of_subpartitioning_ranges)": make each partition id set iterator auto-reset itself
  after it has returned all partition ids in the sequence 
* Fix "Range mapping" and "Range mapping" partitioning interval analysis functions to 
  correctly deal with NULL values.
2006-04-06 21:23:33 +04:00
sergefp@mysql.com
2130fd06bd BUG#18659: In get_part_iter_for_interval_via_walking(), when we need to
obtain partition number, call partition_info->get_part_partition_id() when
the table has subpartitions, and get_partition_id() otherwise. (The bug
was that we were always doing the latter)
2006-04-04 00:52:14 +04:00
mikael@c-4908e253.1238-1-64736c10.cust.bredbandsbolaget.se
e94274f0cd Fixes 2006-04-03 12:26:35 -04:00
mikael@c-4908e253.1238-1-64736c10.cust.bredbandsbolaget.se
0a02cbb5f6 Merge c-4908e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/clean-mysql-5.1-new
into  c-4908e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/wl2826
2006-04-01 16:31:53 -05:00
mikron@c-2509e253.1238-1-64736c10.cust.bredbandsbolaget.se
635b0a9dc0 WL 2826: Error handling of ALTER TABLE for partitioning
More review fixes
2006-04-01 16:37:36 +02:00
mikael@c-520ae253.1238-1-64736c10.cust.bredbandsbolaget.se
ec1445aac8 Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  c-520ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug13520
2006-04-01 00:59:25 -05:00
sergefp@mysql.com
dfb37cb3b1 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into mysql.com:/home/psergey/mysql-5.1-bug18025-r2
2006-03-31 22:26:04 +04:00
reggie@linux.site
b05f270c1f Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  linux.site:/home/reggie/work/mysql-5.1-bug17631
2006-03-31 11:42:12 -06:00
reggie@linux.site
795659e775 cleaned up a few method comments
moved several functions from sql_partition to be member functions
2006-03-31 11:39:44 -06:00
sergefp@mysql.com
da81072823 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into mysql.com:/home/psergey/mysql-5.1-bug18025-r2
2006-03-31 15:20:00 +04:00
sergefp@mysql.com
3886483b54 Fix for BUG#18025: Wrong query results because of bugs in partition pruning:
- Fix typo bug in SEL_ARG::is_singlepoint()
 - In set_up_range_analysis_info(), treat MEDIUMINT as enumerable type just like other integer types
2006-03-31 15:17:15 +04:00
monty@mysql.com
c3e7c7aa4b Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  mysql.com:/home/my/mysql-5.1
2006-03-29 17:28:40 +03:00
monty@mysql.com
1994ed49ec Fixed compiler and valgrind warnings
Added missing DBUG_xxx_RETURN statements
Fixed some usage of not initialized variables (as found by valgrind)
Ensure that we don't remove locked tables used as name locks from open table cache until unlock_table_names() are called.
This was fixed by having drop_locked_name() returning any table used as a name lock so that we can free it in unlock_table_names()
This will allow Tomas to continue with his work to use namelocks to syncronize things.

Note: valgrind still produces a lot of warnings about using not initialized code and shows memory loss errors when running the ndb tests
2006-03-29 14:27:36 +03:00
mikael@c-bc0be253.1238-1-64736c10.cust.bredbandsbolaget.se
bcd2a795d8 BUG#13520: BUG#13433: Fixed proper delimiters for fields and comments 2006-03-28 17:41:50 -05:00
gluh@eagle.intranet.mysql.r18.ru
9c82b6746a Bug#18053 Partitions: crash if null
Bug#18070 Partitions: wrong result on WHERE ... IS NULL
 removed unnecessary code
 added handling of NULL values
2006-03-28 17:25:19 +05:00
pappa@c-8808e253.1238-1-64736c10.cust.bredbandsbolaget.se
24897407d6 BUG#16806: ALTER TABLE with new field in before position fails
Review fixes
2006-03-24 18:21:43 -05:00
pappa@c-8808e253.1238-1-64736c10.cust.bredbandsbolaget.se
f8088c1804 WL 2826: Error handling of ALTER TABLE for partitioning
Loads of review comments fixed
inactivate => deactivate
table log => ddl log
Commented on Error Inject Module added
Put various #defines into enums
Fixed abort_and_upgrade_lock, removed unnecessary parameter
Fixed mysqlish method intro's
Fixed warning statements
5.1.7 was released still with partition states in clear text

Fixed io_size bug
Fixed bug in open that TRUNCATED before reading :)
file_entry => file_entry_buf
Don't open DDL log until first write call to DDL log
handler_type => handler_name
no => num
2006-03-24 18:19:13 -05:00
pappa@c-8808e253.1238-1-64736c10.cust.bredbandsbolaget.se
2d2bd9fe7a BUG #16806: ALTER TABLE fails when creating new field not last in table
Moved some code to else path to avoid delete, create, delete, create scenarios.
Fixed up the partition info object for some cases where we move from default
partitioning in NDB to default partitioning using partitioning.
2006-03-23 16:00:58 -05:00
pappa@c-8808e253.1238-1-64736c10.cust.bredbandsbolaget.se
ac10cffe80 OPTIMIZE, ANALYZE, CHECK, REPAIR and REBUILD only supported if fast_alter_partition flag set 2006-03-22 10:52:12 -05:00
pappa@c-8808e253.1238-1-64736c10.cust.bredbandsbolaget.se
05105a02cc manual merge 2006-03-22 00:17:22 -05:00
pappa@c-8808e253.1238-1-64736c10.cust.bredbandsbolaget.se
3dc4635c70 Merge c-8808e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.1-new
into  c-8808e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/wl2826
2006-03-21 10:44:59 -05:00
pappa@c-8808e253.1238-1-64736c10.cust.bredbandsbolaget.se
86086e7193 Manual merge 2006-03-20 23:55:10 -05:00
pappa@c-8808e253.1238-1-64736c10.cust.bredbandsbolaget.se
4d2b8f8ef6 Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  c-8808e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug17754
2006-03-20 22:47:48 -05:00
pappa@c-8808e253.1238-1-64736c10.cust.bredbandsbolaget.se
738176c15f Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  c-8808e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug17754
2006-03-20 14:41:50 -05:00
pappa@c-8808e253.1238-1-64736c10.cust.bredbandsbolaget.se
bd77396a94 BUG#17754
Added new syntax ALTER TABLE t1 REMOVE PARTITIONING,
changed semantics of ALTER TABLE t1 ENGINE=X; to not remove partitioning
Fix a number of mix engine bugs in partitioning
2006-03-20 14:36:21 -05:00
holyfoot@mysql.com
fc94004a65 merging 2006-03-20 19:22:56 +04:00
gluh@eagle.intranet.mysql.r18.ru
c0420a5c5e Bug#14367 Partitions: crash if utf8 column
use part_info->item_free_list instead of thd->free_list during partition function parsing
2006-03-20 17:41:45 +04:00
holyfoot@vva.(none)
a68742f460 bug #17290 (sp with delete, create and rollback causes MySQLD core)
additional fixes
2006-03-20 17:30:01 +04:00
holyfoot@mysql.com
d1909208a3 Merge bk@192.168.21.1:mysql-5.1-new
into mysql.com:/home/hf/work/mysql-5.1.clean
2006-03-18 18:51:17 +04:00
holyfoot@vva.(none)
8074262eda bug 17290 and bug 14350
added THD::work_part_info member where we now store modified
partition_info structure.
It allows no solve problem when different parts of the part_info get
into different mem_roots
2006-03-18 18:48:21 +04:00
mikael@zim.(none)
89b10826ce BUG#17772
A crash after ALTER TABLE t1 RENAME ...
2006-03-16 03:21:15 -08:00
mikael@zim.(none)
083e3da011 Manual merge 2006-03-14 03:46:12 -08:00
mikael@zim.(none)
cad342ae02 Merge zim.(none):/home/mikael/bug17127
into  zim.(none):/home/mikael/bug16370
2006-03-14 02:50:29 -08:00
mikael@zim.(none)
4b4b8f933e Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  zim.(none):/home/mikael/bug17127
2006-03-14 02:32:46 -08:00
mikael@zim.(none)
0ec5ee2c50 Manual merge 2006-03-14 01:39:27 -08:00
mikael@zim.(none)
ff77d7665d Merge zim.(none):/home/mikael/bug15961
into  zim.(none):/home/mikael/bug16370
2006-03-14 01:24:06 -08:00
mikael@zim.(none)
946979d2af Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  zim.(none):/home/mikael/bug16370
2006-03-14 01:07:29 -08:00
mikael@zim.(none)
a0f22844a7 Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  zim.(none):/home/mikael/bug15961
2006-03-14 00:51:44 -08:00
mikael@zim.(none)
4adb973df4 BUG#15961: After review fixes
New error message
2006-03-14 00:39:06 -08:00
jimw@mysql.com
cf48e4cde6 Merge mysql.com:/home/jimw/my/mysql-5.1-17097
into  mysql.com:/home/jimw/my/mysql-5.1-clean
2006-03-13 06:20:20 -08:00
jimw@mysql.com
ed453f077f Bug #17097: Partitions: failing ADD PRIMARY KEY leads to temporary rotten metadata,crash
When doing an ALTER TABLE on a table using partitioning, force the table
  definition to get reloaded, since it may become invalid whenever the ALTER
  TABLE fails (even for an ALTER TABLE without specific partitioning changes).
2006-03-13 05:01:11 -08:00
mikael@zim.(none)
d10a0e7e35 Ensure we discover also error in using subpartition parts in
non-subpartitioned tables in ALTER TABLE ADD/REORGANIZE PARTITION
2006-03-11 06:32:24 -08:00
mikael@zim.(none)
c34c2cfa45 BUG#15961: SUBPARTITION defined in non-subpartitioned table no error
Made sure that no subpartition stuff in non-subpartitioned table
2006-03-11 06:17:10 -08:00
mikael@zim.(none)
8d3c7e3b27 BUG#16370: Default subpartitioning not properly handled in conjunction
with ALTER TABLE ADD/REORGANIZE PARTITION
Ensure that default subpartitioning is removed when subpartitions
are defined in ADD/REORGANIZE PARTITION
2006-03-11 05:56:06 -08:00
mikron@mikael-ronstr-ms-dator.local
8a5f3b5339 Merge mikael@gorf.tangent.org:/home/mikael/bug17127
into  mikael-ronstr-ms-dator.local:/Users/mikron/bug17127
2006-03-10 10:43:39 +01:00
brian@zim.(none)
469893066b Fixed portability issue in 5.1 to include parsers from other applications. 2006-03-09 17:37:59 -08:00
mikron@mikael-ronstr-ms-dator.local
0a48cd762a BUG#17127: Crash if wrong use of VALUES for list partition 2006-03-09 18:19:34 +01:00
gluh@eagle.intranet.mysql.r18.ru
bcf710e97c Fix for bug#15447 Partitions: NULL is treated as zero
NULL value handling
2006-03-07 15:25:08 +04:00
bar@mysql.com
abf1fc9bd5 Bug#14527: Partitions: table unreadable if partition name = c-cedilla
sql_partition.cc:
  Changeing THD charset to utf8 when parsing a frm file.
partition_charset.test, partition_charset.result:
  new file
2006-03-02 12:25:02 +04:00
tomas@poseidon.ndb.mysql.com
7c6ed2d681 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new
2006-03-01 09:57:36 +01:00
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