on non-partitioned table
Problem was that partitioning specific commands was accepted
for non partitioned tables and treated like
ANALYZE/CHECK/OPTIMIZE/REPAIR TABLE, after bug-20129 was fixed,
which changed the code path from mysql_alter_table to
mysql_admin_table.
Solution was to check if the table was partitioned before
trying to execute the admin command
mysql-test/r/partition_mgm_err.result:
Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
on non-partitioned table
Updated test result
mysql-test/t/partition_mgm_err.test:
Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
on non-partitioned table
Updated test case
sql/ha_partition.cc:
Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
on non-partitioned table
Simplified the code by using ALTER_ADMIN_PARTITION for all
commands that go through mysql_admin_tables and is set
for partitioning specific commands that.
sql/ha_partition.h:
Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
on non-partitioned table
Simplified the code by using ALTER_ADMIN_PARTITION for all
commands that go through mysql_admin_tables and is set
for partitioning specific commands that.
sql/sql_lex.h:
Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
on non-partitioned table
Simplified the code by using ALTER_ADMIN_PARTITION for all
commands that go through mysql_admin_tables and is set
for partitioning specific commands that.
Removed ALTER_ANALYZE/CHECK/OPTIMIZE/REPAIR_PARTITION and
added ALTER_ADMIN_PARTITION instead.
sql/sql_partition.cc:
Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
on non-partitioned table
Simplified the code by using ALTER_ADMIN_PARTITION for all
commands that go through mysql_admin_tables and is set
for partitioning specific commands that.
Removed ALTER_ANALYZE/CHECK/OPTIMIZE/REPAIR_PARTITION and
added ALTER_ADMIN_PARTITION instead.
sql/sql_table.cc:
Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
on non-partitioned table
Give error and return if trying partitioning admin command
on non partitioned table.
Simplified the code by using ALTER_ADMIN_PARTITION for all
commands that go through mysql_admin_tables and is set
for partitioning specific commands that.
Removed ALTER_ANALYZE/CHECK/OPTIMIZE/REPAIR_PARTITION and
added ALTER_ADMIN_PARTITION instead.
sql/sql_yacc.yy:
Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work
on non-partitioned table
Simplified the code by using ALTER_ADMIN_PARTITION for all
commands that go through mysql_admin_tables and is set
for partitioning specific commands that.
Removed ALTER_ANALYZE/CHECK/OPTIMIZE/REPAIR_PARTITION and
added ALTER_ADMIN_PARTITION instead.
Made sure that no subpartition stuff in non-subpartitioned table
mysql-test/r/partition.result:
New test case
mysql-test/r/partition_mgm_err.result:
Fixed bug in test case
mysql-test/t/partition.test:
New test case
mysql-test/t/partition_mgm_err.test:
Fixed bug in test case
sql/sql_partition.cc:
Made sure that no subpartition stuff in non-subpartitioned table
BitKeeper/etc/ignore:
added storage/ndb/src/common/util/testBitmask.cpp
mysql-test/mysql-test-run.sh:
Add libmysql_r/.libs to path for shared libraries.
(Needed for mysqlimport)
mysql-test/r/ctype_cp932_notembedded.result:
After merge fix
mysql-test/r/func_system.result:
Version number on embedded server can be longer than 40
mysql-test/r/partition_mgm_err.result:
Move tests that require symlinks to partion_mgm_err2.test
mysql-test/r/query_cache.result:
Fix possible errors from previous tests
mysql-test/t/ctype_cp932_notembedded.test:
After merge fix
mysql-test/t/func_system.test:
Version number on embedded server can be longer than 40
mysql-test/t/partition_mgm_err.test:
Move tests that require symlinks to partion_mgm_err2.test
mysql-test/t/query_cache.test:
Fix possible errors from previous tests
mysys/my_symlink2.c:
More debugging
sql/event.cc:
Code cleanup
sql/event_executor.cc:
Ensure that event mutexes are properly cleared up
sql/mysqld.cc:
Ensure that event mutexes are properly cleared up
mysql-test/r/partition_mgm_err2.result:
New BitKeeper file ``mysql-test/r/partition_mgm_err2.result''
mysql-test/t/partition_mgm_err2.test:
New BitKeeper file ``mysql-test/t/partition_mgm_err2.test''
libmysqld/Makefile.am:
changed name to partition_info.cc
mysql-test/r/partition_mgm_err.result:
added drop table for previous test
mysql-test/t/partition_mgm_err.test:
added drop table for previous test
sql/Makefile.am:
reformatted a bit
changed name of partition_info.cpp to partition_info.cc
sql/partition_element.h:
updated copyright date
sql/partition_info.cc:
minor corrections as a result of review
sql/partition_info.h:
updated copyright date
sql/sql_partition.cc:
updated file comment and fixed some spacing
sql/sql_partition.h:
updated copyright date
win/cmakefiles/sql:
changed name to partition_info.cc
- Use "system" to execute rm, mkdir etc
- Use MYSQLTEST_VARDIR
mysql-test/t/partition_mgm_err.test:
Use system to execute "unix" command.
Use MYSQLTEST_VARDIR
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
mysql-test/r/partition_mgm_err.result:
result block for test of bug # 15408
mysql-test/t/partition_mgm_err.test:
test for duplicate subpartition names
sql/Makefile.am:
adding sql_partition.h, partition_info.cpp, partition_info.h, and partition_element.h to the makefile
sql/ha_partition.cc:
using the new members of partition_info
sql/ha_partition.h:
using the new members of partition_info
sql/handler.h:
moved this code into sql_partition.h
sql/mysql_priv.h:
including sql_partition.h also now
sql/opt_range.cc:
using the new members of partition_info
sql/sql_partition.cc:
moved some of the functions out and into the partition_info class
using the new members of partition_info
sql/sql_show.cc:
using the new members of partition_info
win/cmakefiles/sql:
added partition_info.cpp to the sql cmake file
sql/partition_element.h:
New BitKeeper file ``sql/partition_element.h''
sql/partition_info.h:
New BitKeeper file ``sql/partition_info.h''
sql/sql_partition.h:
New BitKeeper file ``sql/sql_partition.h''
It is ok for a partitioned table to have only 1 partition. This test is just to show that
doing the ALTER TABLE ADD PARTITION doesn't crash the server.
partition_mgm_err.result:
Added result block for test of bug #15820
partition_mgm_err.test:
Added test block for bug #15820
mysql-test/t/partition_mgm_err.test:
Added test block for bug #15820
mysql-test/r/partition_mgm_err.result:
Added result block for test of bug #15820
/var/tmp in my path when testing data diretory. the var directory
exists in a src tree but may not exist in a different testing
build setup.
mysql-test/r/partition_mgm_err.result:
added a row insert just to make sure the data and index files are made
mysql-test/t/partition_mgm_err.test:
removed the /var/tmp path elements since there is not guarantee that
other build setups will include this path
into linux.site:/home/reggie/work/mysql-5.1-bug14354
mysql-test/r/partition_mgm_err.result:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/ha_partition.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_partition.cc:
Auto merged
mysql-test/t/partition_mgm_err.test:
SCCS merged
mysql-test/r/partition_mgm_err.result:
only the single drop table since we have disabled query logging for the create table
mysql-test/t/partition_mgm_err.test:
test for bug #14354
first make sure /tmp/bug14354 is not there, then make the dir
create a partitioned table with the partition using
/tmp/bug14354 as it's data dir
we are disabling query logging since we are using $MYSQL_TEST_DIR
and we are not certain where the tmp files will be created.
sql/ha_partition.cc:
pass partition filename with pathname into
set_up_table_before_create.
remove the path from the passed in value and then append the filename
to the data_file_name or index_file_name if those values were
specified.
sql/ha_partition.h:
added partition_name_with_path to set_up_table_before_create
sql/mysql_priv.h:
move append_file_to_dir to mysql_priv.h
sql/sql_parse.cc:
moving append_file_to_dir to mysql_priv.h
sql/sql_partition.cc:
add_keyword_string was not writing keyword value with quotes
this was fixed by WL 2604
mysql-test/r/partition_mgm_err.result:
result block for bug#15523
mysql-test/t/partition_mgm_err.test:
test block for bug #15523
This bug was fixed as part of the large WL 2604 push.
mysql-test/r/partition_mgm_err.result:
results block for bug #16534
mysql-test/t/partition_mgm_err.test:
test block for bug# 16534
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
include/thr_lock.h:
New method to downgrade locks from TL_WRITE_ONLY
Possibility to upgrade lock while aborting locks
mysql-test/r/ndb_autodiscover.result:
Fix for lowercase and that all NDB tables are now partitioned
mysql-test/r/ndb_bitfield.result:
Fix for lowercase and that all NDB tables are now partitioned
mysql-test/r/ndb_gis.result:
Fix for lowercase and that all NDB tables are now partitioned
mysql-test/r/ndb_partition_key.result:
New test case
mysql-test/r/partition.result:
New test case
mysql-test/r/partition_error.result:
New test case
mysql-test/r/partition_mgm_err.result:
Fix of test case results
mysql-test/t/disabled.def:
partition_03ndb still has bug
mysql-test/t/ndb_partition_key.test:
New test cases for new functionality and bugs
mysql-test/t/partition.test:
New test cases for new functionality and bugs
mysql-test/t/partition_error.test:
New test cases for new functionality and bugs
mysql-test/t/partition_mgm_err.test:
New test cases for new functionality and bugs
mysys/thr_lock.c:
New method to downgrade TL_WRITE_ONLY locks
Possibility to specify if locks are to be upgraded at abort locks
sql/ha_archive.cc:
New handlerton methods
sql/ha_berkeley.cc:
New handlerton methods
sql/ha_blackhole.cc:
New handlerton methods
sql/ha_federated.cc:
New handlerton methods
sql/ha_heap.cc:
New handlerton methods
sql/ha_innodb.cc:
New handlerton methods
sql/ha_myisam.cc:
New handlerton methods
sql/ha_myisammrg.cc:
New handlerton methods
sql/ha_ndbcluster.cc:
New handlerton methods
Moved out packfrm and unpackfrm methods
Adapted many parts to use table_share instead of table->s
Ensured that .ndb file uses filename and not tablename
according to new encoding of names (WL 1324)
All NDB tables are partitioned and set up partition info
Fixed such that tablenames use tablenames and not filenames in NDB
NDB uses auto partitioning for ENGINE=NDB tables
Warning for very large tables
Set RANGE data
Set LIST data
New method to set-up partition info
Set Default number of partitions flag
Set linear hash flag
Set node group array
Set number of fragments
Set max rows
Set tablespace names
New method to get number of partitions of table to use at open table
sql/ha_ndbcluster.h:
Removed partition_flags and alter_table_flags from handler class
A couple of new and changed method headers
sql/ha_ndbcluster_binlog.cc:
Use new method headers
sql/ha_partition.cc:
New handlerton methods
Lots of new function headers
Use #P# as separator between table name and partition name and
#SP# as separator between partition name and subpartition name
Use filename encoding for files both of table name part and of
partition name parts
New method to drop partitions based on partition state
New method to rename partitions based on partition state
New methods to optimize, analyze, check and repair partitions
New methods to optimize, analyze, check and repair table
Helper method to create new partition, open it and external lock
it, not needed to lock it internally since no one else knows about
it yet.
Cleanup method at error for new partitions
New methods to perform bulk of work at ADD/REORGANIZE partitions
(change_partitions, copy_partitions)
sql/ha_partition.h:
New methods and variables
A few dropped ones and a few changed ones
sql/handler.cc:
Handlerton interface changes
New flag to open_table_from_share
sql/handler.h:
New alter_table_flags
New partition flags
New partition states
More states for default handling
Lots of new, dropped and changed interfaces
sql/lex.h:
Added REBUILD and changed name of REORGANISE to REORGANIZE
sql/lock.cc:
Method to downgrade locks
Able to specify if locks upgraded on abort locks
sql/log.cc:
New handlerton methods
sql/mysql_priv.h:
Lots of new interfaces
sql/share/errmsg.txt:
Lots of new, dropped and changed error messages
sql/sql_base.cc:
Adapted to new method headers
New method to abort and upgrade lock
New method to close open tables and downgrade lock
New method to wait for completed table
sql/sql_lex.h:
New flags
sql/sql_partition.cc:
Return int instead of bool in get_partition_id
More defaults handling
Make use of new mem_alloc_error method
More work on function headers
Changes to generate partition syntax to cater for intermediate
partition states
Lots of new code with large comments describing new features for
Partition Management:
ADD/DROP/REORGANIZE/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions
sql/sql_show.cc:
Minors
sql/sql_table.cc:
Moved a couple of methods
New methods to copy create lists and key lists
for use with mysql_prepare_table
New method to write frm file
New handling of handlers with auto partitioning
Fix CREATE TABLE LIKE
Moved code for ADD/DROP/REORGANIZE partitions
Use handlerton method for alter_table_flags
sql/sql_yacc.yy:
More memory alloc error checks
New syntax for REBUILD, ANALYZE, CHECK, OPTIMIZE, REPAIR partitions
sql/table.cc:
Fix length of extra part to be 4 bytes
Partition state introduced in frm file
sql/table.h:
Partition state introduced
sql/unireg.cc:
Partition state introduced
Default partition
storage/csv/ha_tina.cc:
New handlerton methods
storage/example/ha_example.cc:
New handlerton methods
storage/ndb/include/kernel/ndb_limits.h:
RANGE DATA
storage/ndb/include/kernel/signaldata/AlterTable.hpp:
New interfaces in ALTER TABLE towards NDB kernel
storage/ndb/include/kernel/signaldata/DiAddTab.hpp:
New section
storage/ndb/include/kernel/signaldata/DictTabInfo.hpp:
Lots of new parts of table description
storage/ndb/include/kernel/signaldata/LqhFrag.hpp:
tablespace id specified in LQHFRAGREQ
storage/ndb/include/ndbapi/NdbDictionary.hpp:
Lots of new methods in NDB dictionary
storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp:
Lots of new variables in table description
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
Lots of new variables in table description
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
Lots of new variables in table description
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
New error insertion
storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp:
a few extra jam's
storage/ndb/src/ndbapi/NdbBlob.cpp:
Changes to definition of blob tables
storage/ndb/src/ndbapi/NdbDictionary.cpp:
Lots of new stuff in NDB dictionary
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp:
Lots of new stuff in NDB dictionary
storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp:
Lots of new stuff in NDB dictionary
storage/ndb/test/ndbapi/test_event.cpp:
removed use of methods no longer in existence
storage/ndb/tools/restore/Restore.cpp:
Renamed variable
mysql-test/r/partition.result:
result fixed
mysql-test/r/partition_mgm_err.result:
result fixed
mysql-test/t/partition.test:
test case added
mysql-test/t/partition_mgm_err.test:
test modified to produce the declared error
sql/handler.h:
check_reorganise_list interface
sql/sql_partition.cc:
check_reorganise_list implementation
sql/sql_table.cc:
now we call check_reorganise_list to do proper test.
Also we should set right no_parts value as it can change here
Added new syntax for partition management
mysql-test/t/partition_error.test:
New line
sql/ha_partition.cc:
Added support for DROP PARTITION on-line
sql/ha_partition.h:
Added support for DROP PARTITION on-line
sql/handler.h:
Introduced state of partition
Introduced extra list of temporary partitions
Removed no_full_parts
A couple of methods to check for duplicate names of partitions
Adaptions of default checks to be useful from ALTER TABLE
partition management
New method on handler to drop partitions
New method to check for foreign keys on table
sql/lex.h:
COALESCE and REORGANISE used by ALTER TABLE x COALESCE/REORGANISE PARTITION
sql/mysql_priv.h:
Parser needs method to check if partition management command is ongoing
sql/share/errmsg.txt:
A number of new error messages for partition management
sql/sql_lex.h:
Adapted the ALTER_INFO data structure for partition management
sql/sql_partition.cc:
Couple of new routines + adaption of existing for new
partition management functionality
sql/sql_table.cc:
bin log writing into separate subroutine to minimise code
duplication.
Lots of new code to handle partition management
sql/sql_yacc.yy:
New syntax for partition management
Fixed a few errors in the parser part for partitioning