statistics (like 4.0 did) (patch #3, with review #1 & #2 feedback addressed)
include/myisam.h:
BUG#12232: Add a server option to treat NULL values as equal when calculating MyISAM index statistics
myisam/mi_check.c:
BUG#12232: Add a server option to treat NULL values as equal when calculating MyISAM index statistics
myisam/myisamchk.c:
BUG#12232: Add a server option to treat NULL values as equal when calculating MyISAM index statistics
mysql-test/r/myisam.result:
BUG#12232: Add a server option to treat NULL values as equal when calculating MyISAM index statistics
mysql-test/t/myisam.test:
BUG#12232: Add a server option to treat NULL values as equal when calculating MyISAM index statistics
sql/ha_myisam.cc:
BUG#12232: Add a server option to treat NULL values as equal when calculating MyISAM index statistics
sql/handler.h:
BUG#12232: Add a server option to treat NULL values as equal when calculating MyISAM index statistics
sql/mysqld.cc:
BUG#12232: Add a server option to treat NULL values as equal when calculating MyISAM index statistics
sql/set_var.cc:
BUG#12232: Add a server option to treat NULL values as equal when calculating MyISAM index statistics
sql/sql_class.h:
BUG#12232: Add a server option to treat NULL values as equal when calculating MyISAM index statistics
mysql-test/r/archive.result:
Update for test case to make sure that TRUNCATE and DELETE function(hah!) as designed.
mysql-test/t/archive.test:
Add TRUNCATE and DELETE support.
sql/examples/ha_archive.cc:
Added delete_all_rows() support.
sql/examples/ha_archive.h:
Added delete_all_rows() support.
sql/handler.h:
Added flags for fast delete support for archive and federated.
- Added better error messages when trying to open a table that can't be discovered or unpacked. The most likely cause of this is that it does not have any frm data, probably since it has been created from NdbApi or is a NDB system table.
- Separated functionality that was in ha_create_table_from_engine into two functions. One that checks if the table exists and another one that tries to create the table from the engine.
mysql-test/r/ndb_autodiscover.result:
Add tests for reading from a table that can't be discovered(SYSTAB_0)
Discovery is not performed during create table anymore.
mysql-test/t/ndb_autodiscover.test:
Add tests for reading from a table that can't be discovered(SYSTAB_0)
Discovery is not performed during create table anymore.
ndb/test/ndbapi/create_tab.cpp:
Set connectstring before creating Ndb object.
sql/ha_ndbcluster.cc:
Rename and use the function ndbcluster_table_exists_in_engine.
Correct return valu from ndbcluster_discover
Remove old code "ndb_discover_tables"
sql/ha_ndbcluster.h:
Rename function ndbcluster_table_exists to ndb ndbcluster_table_exists_in_engine
sql/handler.cc:
Update comment of ha_create_table_from_engine
Remove parameter create_if_found from ha_create_table_from_engine, the function ha_table_exists_in_engine is now used toi check if table is found in engine.
Cleanup return codes from ha_create_table_from_engine.
Change name of ha_table_exists to ha_table_exists_in_engine, update comment and returne codes.
sql/handler.h:
Remove paramter create_if_cound from ha_create_table_from_engine
Rename ha_table_exists to ha_table_exists_in_engine
sql/sql_base.cc:
Use the function ha_table_exists_in_engine to detect if table exists in enegine.
If it exists, call function ha_create_table_from_engine to try and create it.
If create of table fails, set correct error message.
sql/sql_table.cc:
Add comments, remove parameter create_if_found to ha_create_table_from_engine.
When dropping a table, try to discover it from engine. If discover fails, use same error message as if the table didn't exists.
Maybe another message should be displayed here, ex: "Table could not be dropped, unpack failed"
When creating a new table, use ha_table_exists_in_engine to check if a table with the given name already exists.
After review version.
Added a condition for MERGE tables. These do not have unique
indexes. But every key could be a unique key on the underlying
MyISAM table. So get the maximum key length for MERGE tables
instead of the maximum unique key length. This is used for
buffer allocation in write_record().
mysql-test/r/merge.result:
Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
The test result.
mysql-test/t/merge.test:
Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
The test case does not in all cases show the problem
without the bugfix. The improper memory allocation
might get through undetected in many cases.
sql/ha_myisammrg.h:
Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
Set a table_flag for the MERGE engine telling that any index
might be unique without being specified as such.
sql/handler.h:
Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
Added a new table_flag telling that any index
might be unique without being specified as such.
sql/sql_insert.cc:
Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
Changed the freeing of the memory to be symmetric to its
allocation (my_safe_alloc -> my_safe_afree).
This is not directly related to the bug.
sql/table.cc:
Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
Added a condition for MERGE tables. These do not have unique
indexes. But every key could be a unique key on the underlying
MyISAM table. So get the maximum key length for MERGE tables
instead of the maximum unique key length. This is used for
buffer allocation in write_record().
Count null_bits separately from field offsets and adjust them in case of primary key parts.
(Previously a CREATE TABLE with a lot of null fields that was part of a primary key caused MySQL to wrongly count the number of bytes needed to store null bits)
This is a more complete bug fix for #6236
mysql-test/r/alter_table.result:
More test for bug #6236 (CREATE TABLE didn't properly count not null columns for primary keys)
mysql-test/t/alter_table.test:
More test for bug #6236 (CREATE TABLE didn't properly count not null columns for primary keys)
sql/handler.h:
Add counter for null fields
sql/sql_table.cc:
Change create_field->offset to store offset from start of fields, independent of null bits.
Count null_bits separately from field offsets and adjust them in case of primary key parts.
sql/unireg.cc:
Change create_field->offset to store offset from start of fields, independent of null bits.
Count null_bits separately from field offsets and adjust them in case of primary key parts.
- Introduce ifdefs so we can control when to use #pragma interface on cygwin
include/my_global.h:
Turn on use of #pragma implementation and #pragma interface if compiled with GCC and platform != Cygwin
include/raid.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/examples/ha_archive.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/examples/ha_example.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/field.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_berkeley.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_blackhole.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_heap.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_innodb.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_isam.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_isammrg.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_myisam.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_myisammrg.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_ndbcluster.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/handler.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/item.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/item_cmpfunc.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/item_func.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/item_geofunc.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/item_strfunc.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/item_subselect.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/item_sum.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/item_timefunc.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/opt_range.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/procedure.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/protocol.h:
replace __GNUC__ with USE_PRAGMA_IMPLEMENTATION
sql/set_var.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/sql_class.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/sql_list.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/sql_select.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/sql_string.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/sql_udf.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/tztime.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
refuse to start up if it is not. (Bug #9815)
sql/handler.cc:
Add ha_storage_engine_is_enabled function.
sql/handler.h:
Declare ha_storage_engine_is_enabled()
sql/mysqld.cc:
Abort startup if the specified default storage engine is
not available.
if there are foreign key constraints on the table. (Bug #5574)
sql/ha_innodb.cc:
Add method can_switch_engines()
sql/ha_innodb.h:
Add method can_switch_engines()
sql/handler.h:
Add method can_switch_engines()
sql/sql_table.cc:
Check handler::can_switch_engines() before switching storage engines
mysql-test/r/ps_1general.result:
Fix test case.
sql/handler.h:
Added federated to the list so that any beta users won't end up with a mismatch for table enum
acinclude.m4:
New macro rule for ha_blackhole.
configure.in:
Rule enabling blackhole engine
sql/Makefile.am:
Additions to Makefile for blackhole engine
sql/handler.cc:
Ifdef enable code for blackhole (and message for "what does this thing do").
sql/handler.h:
Flag for storage engine type.
sql/mysql_priv.h:
Added blackhole type.
sql/mysqld.cc:
Updates for building backhole.
sql/set_var.cc:
Show variable for blackhole engine
ftbw->off wasn't cleared on reinit - Bug#8234
include/ft_global.h:
get rid of default_charset_info in indexless fulltext searches
myisam/ft_boolean_search.c:
get rid of default_charset_info in indexless fulltext searches
clear ftbw->off on reinits
myisam/ft_static.c:
get rid of default_charset_info in indexless fulltext searches
myisam/ftdefs.h:
get rid of default_charset_info in indexless fulltext searches
sql/ha_myisam.h:
get rid of default_charset_info in indexless fulltext searches
sql/handler.h:
get rid of default_charset_info in indexless fulltext searches
sql/item_func.cc:
get rid of default_charset_info in indexless fulltext searches
mysql-test/r/subselect.result:
subqueries with full text search
mysql-test/t/subselect.test:
subqueries with full text search
sql/ha_myisam.h:
backport Serg's fix of FT interface
sql/handler.h:
backport Serg's fix of FT interface
sql/opt_range.h:
backport Serg's fix of FT interface
sql/sql_select.cc:
comment for previous patch
client/mysqldump.c:
Auto merged
sql/handler.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/handler.h:
SCCS merged
binlog coordinates corresponding to the dump".
The good news is that now mysqldump can be used to get an online backup of InnoDB *which works for
point-in-time recovery and replication slave creation*. Formerly, mysqldump --master-data --single-transaction
used to call in fact mysqldump --master-data, so the dump was not an online dump (took big lock all time of dump).
The only lock which is now taken in this patch is at the beginning of the dump: mysqldump does:
FLUSH TABLES WITH READ LOCK; START TRANSACTION WITH CONSISTENT SNAPSHOT; SHOW MASTER STATUS; UNLOCK TABLES;
so the lock time is in fact the time FLUSH TABLES WITH READ LOCK takes to return (can be 0 or very long, if
a table is undergoing a huge update).
I have done some more minor changes listed in the paragraph of mysqldump.c.
WL#2237 "WITH CONSISTENT SNAPSHOT clause for START TRANSACTION":
it's a START TRANSACTION which additionally starts a consistent read on all
capable storage engine (i.e. InnoDB). So, can serve as a replacement for
BEGIN; SELECT * FROM some_innodb_table LIMIT 1; which starts a consistent read too.
client/mysqldump.c:
Main change: mysqldump --single-transaction --master-data is now able to, at the same time,
take an online dump of InnoDB (using consistent read) AND get the binlog position corresponding to this dump
(before, using the two options used to silently cancel --single-transaction).
This uses the new START TRANSACTION WITH CONSISTENT SNAPSHOT syntax.
Additional changes:
a) cleanup:
- DBerror calls exit() so some code was unneeded
- no need to call COMMIT at end, leave disconnection do the job
- mysql_query_with_error_report()
b) requirements I had heard from colleagues:
- --master-data now requires an argument, to comment out ("--") the CHANGE MASTER or not
(commenting had been asked for point-in-time recovery when replication is not necessary).
- --first-slave is renamed to --lock-all-tables
c) more sensible behaviours (has been discussed internally):
- if used with --master-data, --flush-logs is probably intended to get a flush synchronous
with the dump, not one random flush per dumped db.
- disabled automatic reconnection as, at least, SQL_MODE would be lost (and also, depending
on options, LOCK TABLES, BEGIN, FLUSH TABLES WITH READ LOCK).
include/mysqld_error.h:
an error if START TRANSACTION WITH CONSISTENT SNAPSHOT is called and there is no consistent-read capable storage engine
(idea ((C) PeterG) is that it's a bit like CREATE TABLE ENGINE=InnoDB when there is no support for InnoDB).
sql/handler.cc:
new ha_start_consistent_snapshot(), which, inside an existing transaction, starts a consistent read
(offers an alternative to SELECTing any InnoDB table). Does something only for InnoDB.
Warning if no suitable engine supported.
sql/handler.h:
declarations
sql/lex.h:
symbols for lex
sql/share/czech/errmsg.txt:
new message
sql/share/danish/errmsg.txt:
new message
sql/share/dutch/errmsg.txt:
new message
sql/share/english/errmsg.txt:
new message
sql/share/estonian/errmsg.txt:
new message
sql/share/french/errmsg.txt:
new message
sql/share/german/errmsg.txt:
new message
sql/share/greek/errmsg.txt:
new message
sql/share/hungarian/errmsg.txt:
new message
sql/share/italian/errmsg.txt:
new message
sql/share/japanese/errmsg.txt:
new message
sql/share/korean/errmsg.txt:
new message
sql/share/norwegian-ny/errmsg.txt:
new message
sql/share/norwegian/errmsg.txt:
new message
sql/share/polish/errmsg.txt:
new message
sql/share/portuguese/errmsg.txt:
new message
sql/share/romanian/errmsg.txt:
new message
sql/share/russian/errmsg.txt:
new message
sql/share/serbian/errmsg.txt:
new message
sql/share/slovak/errmsg.txt:
new message
sql/share/spanish/errmsg.txt:
new message
sql/share/swedish/errmsg.txt:
new message
sql/share/ukrainian/errmsg.txt:
new message
sql/sql_lex.h:
new option in lex (transaction options)
sql/sql_parse.cc:
warning comment (never make UNLOCK TABLES commit a transaction, please);
support for starting consistent snapshot.
sql/sql_yacc.yy:
new clause WITH CONSISTENT SNAPSHOT (syntax ok'd by PeterG) for START TRANSACTION.
DROP DATABASE failed because of file ext not in TYPELIB of known extensions.
General solution - construct a TYPELIB at runtime instead of a static list.
mysql-test/r/ndb_basic.result:
Bug#6031
New test for bug
mysql-test/t/ndb_basic.test:
Bug#6031
New test for bug
sql/ha_ndbcluster.cc:
Cosmetic fix
sql/handler.cc:
Bug#6031
New function - ha_known_exts()
We can construct TYPELIB of known db file extensions.
sql/handler.h:
Bug#6031
New function - ha_known_exts()
sql/sql_db.cc:
Bug#6031
We use a constructed list of known extensions instead of a static list
BitKeeper/etc/logging_ok:
auto-union
sql/ha_ndbcluster.h:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/mysql-test-run.sh:
SCCS merged
sql/ha_ndbcluster.cc:
SCCS merged
column types TIMESTAMP is NOT NULL by default, so in order to have
TIMESTAMP column holding NULL valaues you have to specify NULL as
one of its attributes (this needed for backward compatibility).
Main changes:
Replaced TABLE::timestamp_default_now/on_update_now members with
TABLE::timestamp_auto_set_type flag which is used everywhere
for determining if we should auto-set value of TIMESTAMP field
during this operation or not. We are also use Field_timestamp::set_time()
instead of handler::update_timestamp() in handlers.
mysql-test/r/type_timestamp.result:
Added test for TIMESTAMP columns which are able to store NULL values.
mysql-test/t/type_timestamp.test:
Added test for TIMESTAMP columns which are able to store NULL values.
sql/field.cc:
Added support for TIMESTAMP fields holding NULL values.
We don't need Field_timestamp::set_timestamp_offsets() anymore.
Instead we need Field_timestamp::get_auto_set_type() function
which will convert TIMESTAMP auto-set type stored in Field in
unireg_check to value from timestamp_auto_set_type_enum.
(We can't replace this function with additional Field_timestamp member
and some code in constructor because then we will have troubles
with Field::new_field() method).
We should also set field to not null in Field_timestamp::set_time() now.
sql/field.h:
Added support for TIMESTAMP fields holding NULL values.
We don't need Field_timestamp::set_timestamp_offsets() anymore.
Instead we need Field_timestamp::get_auto_set_type() function,
which will convert TIMESTAMP auto-set type stored in Field in
unireg_check to value from timestamp_auto_set_type_enum.
We also have to support NULL values in Field_timestamp::get_timestamp()
function.
sql/field_conv.cc:
Added comment clarifying behavior in case of TIMESTAMP fields which are
able to store NULL values.
sql/ha_berkeley.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now for determining
if we should auto-set value of TIMESTAMP field during this operation.
We are also use Field_timestamp::set_time() instead of
handler::update_timestamp().
sql/ha_heap.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now for determining
if we should auto-set value of TIMESTAMP field during this operation.
We are also use Field_timestamp::set_time() instead of
handler::update_timestamp().
sql/ha_innodb.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now for determining
if we should auto-set value of TIMESTAMP field during this operation.
We are also use Field_timestamp::set_time() instead of
handler::update_timestamp().
sql/ha_isam.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now for determining
if we should auto-set value of TIMESTAMP field during this operation.
We are also use Field_timestamp::set_time() instead of
handler::update_timestamp().
sql/ha_isammrg.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now for determining
if we should auto-set value of TIMESTAMP field during this operation.
We are also use Field_timestamp::set_time() instead of
handler::update_timestamp().
sql/ha_myisam.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now for determining
if we should auto-set value of TIMESTAMP field during this operation.
We are also use Field_timestamp::set_time() instead of
handler::update_timestamp().
sql/ha_myisammrg.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now for determining
if we should auto-set value of TIMESTAMP field during this operation.
We are also use Field_timestamp::set_time() instead of
handler::update_timestamp().
sql/ha_ndbcluster.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now for determining
if we should auto-set value of TIMESTAMP field during this operation.
We are also use Field_timestamp::set_time() instead of
handler::update_timestamp().
sql/handler.cc:
handler::update_timestamp() is no longer needed since now we use
Field_timestamp::set_time() instead.
(we can't use handler::update_timestamp() anyway since field position
only is not enough for TIMESTAMP fields which are able to store NULLs)
sql/handler.h:
handler::update_timestamp() is no longer needed since now we use
Field_timestamp::set_time() instead.
sql/item_timefunc.cc:
Since now TIMESTAMP fields can hold NULL values we should take this into
account.
sql/sql_base.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now.
(Here we use Field_timestamp::get_auto_set_type() to setup its value
before further statement execution).
sql/sql_insert.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now.
sql/sql_load.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now.
sql/sql_parse.cc:
Added support for TIMESTAMP fields holding NULL values.
We should distinguish NULL default values and non-specified default
values for such fields (because latter could mean DEFAULT NOW()
ON UPDATE NOW() in some cases).
sql/sql_show.cc:
Added support for TIMESTAMP fields holding NULL values.
Unlike all other fields these are NOT NULL by default
so we have to specify NULL attribute explicitly for them.
sql/sql_table.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now.
sql/sql_update.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now.
sql/sql_yacc.yy:
Added support for TIMESTAMP fields holding NULL values.
Unlike all other fields these are NOT NULL by default
(so we have to set NOT_NULL_FLAG properly for them).
sql/table.h:
Added timestamp_auto_set_type enum which values are used for indicating
during which operations we should automatically set TIMESTAPM field
value to current timestamp.
TABLE: Replaced timestamp_default_now/on_update_now members with
timestamp_auto_set_type flag (Now when TIMESTAMP field are able to
store NULL values, single position of field in record is not enough
for updating this field anyway).
* Changed the implementation of ndbcluster_find_files to be more efficient, using only one mutex lock
* Moved ha_find_files to end of mysql_find_files so that it can be passed the list that we are interested to find.
mysql-test/t/ndb_autodiscover.test:
Added a new test case, disabled for now, waiting for mysql-test-run to set a NDB_CONNECTSTRING
sql/ha_ndbcluster.cc:
Rewrite of ndbcluster_find_files to remove and delete files using only one mutex lock.
This version only discover files that fulfill wildcard.
sql/ha_ndbcluster.h:
Add list of files as parameter
sql/handler.cc:
Add list of files as parameter
sql/handler.h:
Add list of files as parameter
sql/sql_show.cc:
Moving the ha_find_files to end of function, so that the file lista can be passsed to it.
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
mysql-test/r/ndb_autodiscover.result:
Update test result, number of rows is 1
mysql-test/t/ndb_autodiscover.test:
Dont run the test where table is dropped in NDb with ndb_drop_table
sql/ha_ndbcluster.cc:
Implement function ndbcluster_find_files which will discover new tables and delete old tables
sql/ha_ndbcluster.h:
Implement function ndbcluster_find_files
Remove function ndbcluster_list_tables and ndbcluster_can_discover
sql/handler.cc:
Add ha_find_files called from mysql_find_files
Remove ha_can_discover and ha_list_tables
sql/handler.h:
Add ha_find_files called from mysql_find_files
Remove ha_can_discover and ha_list_tables
sql/sql_show.cc:
Revert to original version of sql_show.cc
Only changes to this version is that ha_find_files is called from mysql_find_files in order to give the handlers a possibility to find new files in engine
include/my_base.h:
Added new bit to table create options
Removed old error code HA_ERR_OLD_METADAT and reused it for HA_ERR_NO_SUCH_TABLE.
mysql-test/r/ndb_autodiscover.result:
Updated test cases
mysql-test/t/ndb_autodiscover.test:
Updated test cases
mysql-test/t/ndb_autodiscover2.test:
Updated test cases
sql/discover.cc:
Moved function create_table_from_handler to handler.cc
sql/ha_ndbcluster.cc:
Improved discover functionality
Added .ndb file
Changed error code mappings for a table that does not exist in engine
Check for ndb object in THD
Updated ndbcluster_discover, ndbcluster_list_tables and ndbcluster_can_discover
sql/ha_ndbcluster.h:
Improved discover
sql/handler.cc:
Added new error message mapping.
Moved function ha_create_table_from_engine to handler level
Added new functions ha_can_discover, ha_list_tables and ha_table_exists
sql/handler.h:
Added new error message mapping.
Moved function ha_create_table_from_engine to handler level
Added new functions ha_can_discover, ha_list_tables and ha_table_exists
sql/mysql_priv.h:
Removed create_table_from_handler, moved to handler.h
sql/sql_base.cc:
Renamed function create_table_from_handler
sql/sql_show.cc:
Added new function mysql_discover_files and mysql_list_files.
Modified mysql_find_files to discover new and delete "old" files/tables.
sql/sql_table.cc:
Renamed create_table_from_handler
Call ha_create_table_from_engine, in order to discover the the frm file before it can be dropped.
sql/table.cc:
Added mapping of the error code HA_ERR_NO_SUCH_TABLE
* Renamed handler::estimate_number_of_rows to handler::estimate_rows_upper_bound function, which can also return "unknown"
* made filesort to use full sort buffer if number of rows to sort is not known.
sql/examples/ha_tina.h:
Renamed estimate_number_of_rows -> estimate_rows_upper_bound
sql/filesort.cc:
* Fix for BUG#5117: made filesort() to use full sort buffer if number of rows to sort is not known.
* Comments and assertion added
sql/ha_berkeley.cc:
Renamed estimate_number_of_rows -> estimate_rows_upper_bound
sql/ha_berkeley.h:
Renamed estimate_number_of_rows -> estimate_rows_upper_bound
sql/ha_innodb.cc:
Renamed estimate_number_of_rows -> estimate_rows_upper_bound
sql/ha_innodb.h:
Renamed estimate_number_of_rows -> estimate_rows_upper_bound
sql/handler.h:
Renamed estimate_number_of_rows -> estimate_rows_upper_bound
added tests to alter table for "large" alter tables and truncates in ndbcluster
added debug printout in restart() in ndbcluster
added flag THD::transaction.on to enable/disable transaction
mysql-test/r/ndb_alter_table.result:
added tests to alter table for "large" alter tables and truncates
mysql-test/t/ndb_alter_table.test:
added tests to alter table for "large" alter tables and truncates
ndb/src/ndbapi/NdbConnection.cpp:
added debug printout in restart()
sql/ha_ndbcluster.cc:
added support for large alter table and truncate
sql/handler.cc:
renamed ha_recovery_logging to ha_enable_transaction
sql/handler.h:
renamed ha_recovery_logging to ha_enable_transaction
sql/sql_class.cc:
added flag THD::transaction.on to enable/disable transaction
sql/sql_class.h:
added flag THD::transaction.on to enable/disable transaction
sql/sql_delete.cc:
added disable transaction for mysql_truncate
sql/sql_table.cc:
renamed ha_recovery_logging to ha_enable_transaction
into avenger.(none):/export/brian/tina-4.1
acinclude.m4:
Auto merged
BitKeeper/deleted/.del-acconfig.h~8d2e3113fc8056da:
Auto merged
configure.in:
Auto merged
sql/Makefile.am:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
acconfig.h:
Adding HAVE CSV rule
acinclude.m4:
Build option of csv engine
configure.in:
Update for building CSV
sql/Makefile.am:
Added files for CSV build
sql/handler.cc:
Needed options for CSV to be created.
sql/handler.h:
CSV type engine enum.
sql/mysql_priv.h:
Addition of the have_csv_db variable.
sql/mysqld.cc:
Code to show csv option.
sql/set_var.cc:
Adding have show variables for both csv and example.
Added NDBCLUSTER to table types which does not support generate.
Added test case for truncate.
sql/handler.h:
Add NDBCLUSTER to table types that does not support generate.
Added key part to optimize_range() to fix problems when using fields in key parts.
sql/examples/ha_archive.h:
New handler::index_flags() definition
sql/examples/ha_example.h:
New handler::index_flags() definition
sql/field.cc:
New optimize_range() definition
sql/field.h:
New optimize_range() definition
sql/ha_berkeley.cc:
New handler::index_flags() definition
sql/ha_berkeley.h:
New handler::index_flags() definition
sql/ha_heap.h:
New handler::index_flags() definition
sql/ha_innodb.h:
New handler::index_flags() definition
sql/ha_isam.h:
New handler::index_flags() definition
sql/ha_isammrg.h:
New handler::index_flags() definition
sql/ha_myisam.h:
New handler::index_flags() definition
sql/ha_myisammrg.h:
New handler::index_flags() definition
sql/ha_ndbcluster.cc:
New handler::index_flags() definition
sql/ha_ndbcluster.h:
New handler::index_flags() definition
sql/handler.h:
New handler::index_flags() definition
sql/log.cc:
Fixed compiler warnings
sql/log_event.cc:
Fixed compiler warnings (and renamed short variable name)
sql/opt_range.cc:
New handler::index_flags() definition
sql/opt_sum.cc:
New handler::index_flags() definition
sql/set_var.cc:
Removed compiler warnings
sql/sql_db.cc:
Removed compiler warnings
sql/sql_select.cc:
New handler::index_flags() definition
sql/sql_show.cc:
Removed compiler warnings
sql/sql_update.cc:
Removed compiler warnings
sql/table.cc:
New handler::index_flags() definition
Set default max_allowed_packet to be able to read help tables even if an my.cnf file with this option is present. (Bug #3938)
Don't use default arguments for ha_rnd_init()
Simple code cleanups since last pull
scripts/fill_func_tables.sh:
Change mode to -rw-rw-r--
scripts/make_win_src_distribution.sh:
Safer remove of SCCS directories
scripts/mysql_create_system_tables.sh:
Added missing root user to mysql.user on windows. (Bug #4242)
scripts/mysql_install_db.sh:
Set default max_allowed_packet to be able to read help tables even if an my.cnf file with this option is present. (Bug #3938)
sql/filesort.cc:
Don't use default arguments for ha_rnd_init()
sql/ha_berkeley.cc:
Better to use #ifdef than // to disable code
Removed not needed setting of active_index (It's set in index_end)
sql/ha_berkeley.h:
Don't use default arguments for ha_rnd_init()
sql/ha_heap.h:
Don't use default arguments for ha_rnd_init()
sql/ha_innodb.h:
Don't use default arguments for ha_rnd_init()
sql/ha_isam.h:
Don't use default arguments for ha_rnd_init()
sql/ha_isammrg.h:
Don't use default arguments for ha_rnd_init()
sql/ha_myisam.cc:
Fixed wrong previous patch (New code used 'and' between two conditions when it should be 'or' as in original code)
sql/ha_myisam.h:
Don't use default arguments for ha_rnd_init()
sql/ha_myisammrg.h:
Don't use default arguments for ha_rnd_init()
sql/ha_ndbcluster.h:
Don't use default arguments for ha_rnd_init()
sql/handler.cc:
Code cleanup
sql/handler.h:
Keep bool variables together (better alignment)
sql/records.cc:
Don't use default arguments for ha_rnd_init()
sql/sql_select.cc:
Don't use default arguments for ha_rnd_init()
sql/ha_myisam.h:
- max_supported_key_part_length() is const now
sql/ha_myisammrg.h:
- max_supported_key_part_length() is const now
sql/handler.h:
- max_supported_key_part_length() is const now
- removed warning about wrong order of initializer in handler ocnstructor.
a limitation of yesterday's implementation:
if there was an unfinished transaction (COMMIT not typed), and some MyISAM tables were
then updated, and then mysqld crashes, then at restart the server would use the too old
binlog offset known by InnoDB to cut the binlog, thus cutting the successful MyISAM
updates. We fix this by reporting the binlog offset into InnoDB even if InnoDB was not
affected at all by the update.
But the feature is still disabled until we decide if it can go into 4.1.3.
sql/handler.cc:
How we report the binlog offset into InnoDB:
- if the update affected InnoDB, it will happen naturally
- otherwise (for example MyISAM update not in an InnoDB transaction), we explicitely report it.
sql/handler.h:
removing warning (noticed this)
sql/log.cc:
clearer messages when truncating binlog.
sql/mysql_priv.h:
need to see opt_innodb_safe_binlog in handler.cc
sql/mysqld.cc:
No innodb-safe-binlog if no InnoDB.
Updating message as now we work with MyISAM.
configure.in:
Auto merged
mysql-test/Makefile.am:
Auto merged
mysql-test/r/fulltext.result:
Auto merged
sql/field.cc:
Auto merged
sql/ha_berkeley.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_innodb.h:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/lex.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_help.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
sql/unireg.cc:
Auto merged
exactly it's mapped to "ALTER TABLE t; ANALYZE TABLE t;"
sql/ha_innodb.cc:
::optimize() now returns "try ALTER and then analyze" instead of only analyze.
sql/handler.h:
new code to say "try alter and analyze".
sql/mysql_priv.h:
as we may now use mysql_alter_table() internally to ::optimize we must prevent it from talking to the client.
New function mysql_recreate_table() which is the same as ALTER TABLE t;
sql/sql_parse.cc:
the big block removed here is moved into mysql_recreate_table().
sql/sql_table.cc:
In mysql_admin_table(): if the handler returns HA_ADMIN_TRY_ALTER,
we close the table, recreate it, then open it and analyze it.
This is currently used only for OPTIMIZE TABLE of an InnoDB table.
into brian-akers-computer.local:/Users/brian/mysql/mysql-4.1
BitKeeper/etc/logging_ok:
auto-union
acconfig.h:
Auto merged
acinclude.m4:
Auto merged
configure.in:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/examples/ha_archive.cc:
Added in example information from testing archive with Slashdot's comments.
sql/handler.h:
Fixed broken merge.
sql/set_var.cc:
Adding in "have_archive" to variables shown to make tests work.
WL#1747 and #1746 allow user to decide if ordered index should be created or not
BitKeeper/deleted/.del-AttrType.hpp~a9b2d6efcf660378:
Delete: ndb/include/ndbapi/AttrType.hpp
sql/ha_ndbcluster.cc:
Removed the NDB_ERR_CODE_OFFSET, ndb and handler error codes should not clash
Encapsulated functionality to cache information about known indexes into buil_index_list
Added detection of algorithm from key_info in function get_index_type_from_table
Updated read_range_first and records_in_range to work wih new prototype.
sql/ha_ndbcluster.h:
WL#1746 and WL#1747 Added ability to skip creating an ordered index in addition to the hash index if the user so wishes.
Modified get_error_message to return error messaga in a String datatype, in that way the String class will take care of wheter the "data" has to be freed or not.
sql/handler.cc:
Use String datatype as ouput parameter of get_error_message.
sql/handler.h:
Changed the function prototype for getting error messages from handler to use String datataype
acconfig.h:
Adding undef piece for HAVE_ARCHIVE_DB
acinclude.m4:
Code needed for --with-archive-storage-engine flag for compile.
configure.in:
Adding tag for Archive
sql/Makefile.am:
Source updates to compile ha_archive
sql/examples/ha_archive.cc:
Class file for archive storage engine. First version.
sql/handler.cc:
Updates needed for adding archive storage engine.
sql/handler.h:
ENUM for archive storage engine.
sql/mysql_priv.h:
Archive show options
sql/mysqld.cc:
Ifdef foor HAVE_ARCHIVE_DB
sql/examples/ha_archive.h:
Include file for archive storage engine addition.
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
sql/ha_ndbcluster.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/sql_table.cc:
Auto merged
sql/ha_ndbcluster.h:
SCCS merged
New records_in_range() interface (similar to read_range())
Macros for faster bitmap handling
Simplify read_range() code (#WL1786)
New general key_cmp() function to compare keys
heap/hp_hash.c:
New records_in_range() interface
include/heap.h:
New records_in_range() interface
include/my_base.h:
Moved 'key_range' here so that all table handlers can use it
include/my_bitmap.h:
Make some bitmap functions inline for faster usage in one thread
include/myisam.h:
New records_in_range() interface
include/myisammrg.h:
New records_in_range() interface
myisam/mi_range.c:
New records_in_range() interface
myisam/mi_test2.c:
New records_in_range() interface
myisam/rt_test.c:
New records_in_range() interface
Indentation fixes
myisam/sp_test.c:
New records_in_range() interface
Indentation fixes
myisammrg/myrg_range.c:
New records_in_range() interface
mysys/my_bitmap.c:
Make some bitmap functions inline for faster usage in one thread
sql/examples/ha_example.cc:
New records_in_range() interface
sql/field.cc:
Fixed indentation
sql/ha_berkeley.cc:
New records_in_range() interface
sql/ha_berkeley.h:
New records_in_range() interface
sql/ha_heap.cc:
New records_in_range() interface
sql/ha_heap.h:
New records_in_range() interface
sql/ha_innodb.cc:
New records_in_range() interface
sql/ha_innodb.h:
New records_in_range() interface
sql/ha_isam.cc:
New records_in_range() interface
sql/ha_isam.h:
New records_in_range() interface
sql/ha_myisam.cc:
New records_in_range() interface
sql/ha_myisam.h:
New records_in_range() interface
sql/ha_myisammrg.cc:
New records_in_range() interface
sql/ha_myisammrg.h:
New records_in_range() interface
sql/ha_ndbcluster.cc:
New records_in_range() interface
sql/ha_ndbcluster.h:
New records_in_range() interface
sql/handler.cc:
Simplify read_range() interface:
- Add 'eq_range' to read_range_first
- Remove 'eq_range' parameer from read_range_next()
- Trust values from index_next_same()
- Simplfy compare_key() by moving key_comparision to key.cc (as this code can be reused from other places)
sql/handler.h:
Move key_range to my_base.h to be used by external table handlers
Simplify read_range() interface
New records_in_range() interface
sql/key.cc:
Rename key_cmp() to key_cmp_if_same() to make it more descriptive
Add new key_cmp() function usable from range and handler code.
sql/mysql_priv.h:
Prototypes for new functions
sql/opt_range.cc:
New records_in_range() interface
Simplify cmp_prev()
(We can in 5.0 simplify cmp_next() the same way)
sql/opt_range.h:
Added key_part_info to QUICK_SELECT to be able to use key_cmp() in get_next()
sql/opt_sum.cc:
key_cmp -> key_cmp_if_same
sql/sql_acl.cc:
key_cmp -> key_cmp_if_same
sql/sql_select.cc:
key_cmp -> key_cmp_if_same
- New solution after discussions with Sergei, no handler specific code or error messages should be in sql layer.
next_result, only check for error if check is -1
Improved index_read
include/mysqld_error.h:
New error codes ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG, update number to 298.
Removed prevoius ER_NDB_ERROR, handler specific error should not be here.
sql/ha_ndbcluster.cc:
Removed print_error from ha_ndbcluster, added code to handler::print_error to ask handler::get_error_message for message for an error.
Fix bug in next_result, only check for error if -1 is returned.
Make index_read easier, special case where pk_read or unique_index_read is detected and as default do ordered_index_scan
sql/ha_ndbcluster.h:
Remplace print_error with get_error_message
sql/handler.cc:
Add new function get_error_message usedc to ask handler for a message for an error.
Call get_error_message from print_error if error code is not known.
sql/handler.h:
Add new function get_error_message
sql/share/czech/errmsg.txt:
Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/danish/errmsg.txt:
Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/dutch/errmsg.txt:
Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/english/errmsg.txt:
Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/estonian/errmsg.txt:
Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/french/errmsg.txt:
Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/german/errmsg.txt:
Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/greek/errmsg.txt:
Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/hungarian/errmsg.txt:
Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/italian/errmsg.txt:
Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/korean/errmsg.txt:
Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/norwegian-ny/errmsg.txt:
Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/norwegian/errmsg.txt:
Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/polish/errmsg.txt:
Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/portuguese/errmsg.txt:
Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/romanian/errmsg.txt:
Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/russian/errmsg.txt:
Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/serbian/errmsg.txt:
Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/slovak/errmsg.txt:
Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/spanish/errmsg.txt:
Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/swedish/errmsg.txt:
Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/ukrainian/errmsg.txt:
Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG