with blobs containing nulls
Problem: FEDERATED SE improperly stores NULL fields in the record buffer.
Fix: store them properly.
mysql-test/r/federated.result:
Fix for bug #34779: crash in checksum table on federated tables
with blobs containing nulls
- test result.
mysql-test/t/federated.test:
Fix for bug #34779: crash in checksum table on federated tables
with blobs containing nulls
- test case.
sql/ha_federated.cc:
Fix for bug #34779: crash in checksum table on federated tables
with blobs containing nulls
- storing a NULL field in the record buffer
we must initialize its data as other code
may rely on it.
localhost/default port
When creating federated table that points to unspecified host or
localhost on unspecified port or port is 0, small memory leak occurs.
This happens because we make a copy of unix socket path, which is
never freed.
With this fix we do not make a copy of unix socket path, instead
share->socket points to MYSQL_UNIX_ADDR constant directly.
This fix is covered by a test case for BUG34788.
Affects 5.0 only.
mysql-test/t/federated.test:
A test case for BUG#35509.
sql/ha_federated.cc:
When creating federated table we call parse_url() to check if connect
string is correct. parse_url() may make a copy of unix socket path if
port is not specified or 0 and host is not specified or 'localhost'.
This copy is never freed.
As there is no need to make a copy of unix socket path, let
share->socket point to MYSQL_UNIX_ADDR directly.
correctly - crashes server !
Creating federated table with connect string containing empty
(zero-length) host name and port is evaluated as 0 (port is
incorrect, omitted or 0) crashes server.
This happens because federated calls strcmp() with NULL pointer.
Fixed by avoiding strcmp() call if hostname is set to NULL.
mysql-test/r/federated.result:
A test case for BUG#34788.
mysql-test/t/federated.test:
A test case for BUG#34788.
sql/ha_federated.cc:
Fixed that parse_url() may call strcmp() with NULL pointer.
from storage engine
Federated may crash a server, return wrong result set, return
"ERROR 1030 (HY000): Got error 1430 from storage engine" message
when local (engine=federated) table has a key against nullable
column.
The problem was wrong implementation of function that creates
WHERE clause for remote query from key.
mysql-test/r/federated.result:
A test case for BUG#33946.
mysql-test/t/federated.test:
A test case for BUG#33946.
sql/ha_federated.cc:
Fixed that federated adds " IS NULL " condition to a remote query,
whereas "IS NOT NULL" requested by original query.
Fixed that federated didn't check for end of key buffer, didn't
setup key buffer pointer and remaining lenght of key buffer,
didn't add " AND " between conditions in case original query
has IS [NOT] NULL condition against nullable column.
Fixed that federated wrongly shifts key buffer pointer by extra
one byte when key part may be null (was: store_length + 1,
now: store_length).
filesort() uses file->estimate_rows_upper_bound() call to allocate
internal buffers. If this function returns a value smaller than
a number of row that will be returned later in find_all_keys(),
that can cause server crash.
Fixed by implementing ha_federated::estimate_rows_upper_bound() to
return maximum possible number of rows.
Present estimation for FEDERATED always returns 0 if the linked to the VIEW.
mysql-test/r/federated.result:
Bug #32374 crash with filesort when selecting from federated table and view.
test result
mysql-test/t/federated.test:
Bug #32374 crash with filesort when selecting from federated table and view.
test case
sql/ha_federated.cc:
Bug #32374 crash with filesort when selecting from federated table and view.
ha_federated::estimate_rows_upper_bound() implemented
sql/ha_federated.h:
Bug #32374 crash with filesort when selecting from federated table and view.
ha_federated::estimate_rows_upper_bound() interface
into bodhi.(none):/opt/local/work/mysql-5.0-runtime
mysql-test/r/federated.result:
Auto merged
mysql-test/t/federated.test:
Auto merged
sql/item.cc:
Auto merged
into ramayana.hindu.god:/home/tsmith/m/bk/maint/50
mysql-test/r/federated.result:
Auto merged
mysql-test/t/federated.test:
Auto merged
sql/ha_federated.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/r/innodb_mysql.result:
Manual merge
mysql-test/t/innodb_mysql.test:
Manual merge
error 1159 ' ' (fixed by the patch for Bug 25679)
mysql-test/r/federated.result:
Update results (Bug#18287)
mysql-test/t/federated.test:
Add a test case for Bug#18287 create federated table always times out,
error 1159 ' '
"Federated Denial of Service"
Federated storage engine used to attempt to open connections within
the ::create() and ::open() methods which are invoked while LOCK_open
mutex is being held by mysqld. As a result, no other client sessions
can open tables while Federated is attempting to open a connection.
Long DNS lookup times would stall mysqld's operation and a rogue
connection string which connects to a remote server which simply
stalls during handshake can stall mysqld for a much longer period of
time.
This patch moves the opening of the connection much later, when the
federated actually issues queries, by which time the LOCK_open mutex is
no longer being held.
mysql-test/r/federated.result:
change of test/results due to patch for bug25679
mysql-test/t/federated.test:
change of test/results due to patch for bug25679
sql/ha_federated.cc:
bug25679
remove function check_foreign_fata_source()
ha_federated::open() no longer opens the federated connection.
ha_federated::create() no longer opens and tests connection.
ha_federated::real_connect() opens connection and tests presence of table.
ha_federated::real_query() sends query, calling real_connect() if neccessary.
sql/ha_federated.h:
bug25679
new methods real_query() and real_connect()
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
mysql-test/t/federated.test:
Auto merged
sql/ha_federated.h:
Auto merged
mysql-test/r/federated.result:
Manual merge.
when creating table
Federated tables had an artificially low maximum of key length,
because the handler failed to implement a method to return it and
the default value is taked from the prototype handler.
Now, implement that method and return the maximum possible key
length, which is that of InnoDB.
mysql-test/r/federated.result:
Verify that unique keys may be longer than 255 characters.
mysql-test/t/federated.test:
Verify that unique keys may be longer than 255 characters.
sql/ha_federated.h:
Implement the virtual method that tells the max size of parts to
make a key.
Backport the length defined in 5.1.
"Federated INSERT failures"
Federated does not correctly handle "INSERT...ON DUPLICATE KEY UPDATE"
However, implementing such support is not reasonably possible without
increasing complexity of the storage engine: checking that constraints
on remote server match local server and parsing error messages.
This patch causes 'ON DUPLICATE KEY' to fail with ER_DUP_KEY message
if a conflict occurs and not to fail silently.
include/my_base.h:
bug25511
new storage engine hint: HA_EXTRA_INSERT_WITH_UPDATE
mysql-test/r/federated.result:
test for bug25511
mysql-test/t/federated.test:
test for bug25511
sql/ha_federated.cc:
bug25511
implement support for handling HA_EXTRA_INSERT_WITH_UPDATE hint
sql/ha_federated.h:
bug25511
new property: insert_dup_update
sql/sql_insert.cc:
bug25511
implement support for HA_EXTRA_INSERT_WITH_UPDATE
When checking duplicates flag, if it is DUP_UPDATE, send hint
to the storage engine.
"REPLACE/INSERT IGNORE/UPDATE IGNORE doesn't work"
Federated does not record neccessary HA_EXTRA flags in order to
support REPLACE/INSERT IGNORE/UPDATE IGNORE.
Implement ::extra() to capture flags neccessary for functionality.
New function append_ident() to better escape identifiers consistantly.
mysql-test/r/federated.result:
test for bug29019
mysql-test/t/federated.test:
test for bug29019
sql/ha_federated.cc:
Bug29019
Federated does not record neccessary HA_EXTRA flags in order to
support REPLACE/INSERT IGNORE/UPDATE IGNORE.
Implement ::extra() to capture flags neccessary for functionality.
New function append_ident() to better escape identifiers consistantly.
sql/ha_federated.h:
bug29019
add 2 member values to ha_federated class
ignore_duplicates and replace_duplicates.
add 1 member method to ha_federated class
extra()
fixed test to replace port to SLAVE_PORT in result file
federated.result:
new result file
mysql-test/t/federated.test:
fixed test to replace port to SLAVE_PORT in result file
mysql-test/r/federated.result:
new result file
- Added 'SET NAMES <charset>" upon ::open
- Added test and results for simple UTF test
federated.test:
BUG #17044 Federated Storage Engine not UTF8 clean
New test. Using hex - pasting various charsets in the terminal doesn't work.
federated.result:
BUG# 17044 Federated Storage Engine not UTF8 clean
New test results
ha_federated.cc:
BUG# 17044 Federated Storage Engine not UTF8 clean
Upon ::open, set names to table's charset
sql/ha_federated.cc:
BUG# 17044 Federated Storage Engine not UTF8 clean
Upon ::open, set names to table's charset
mysql-test/t/federated.test:
BUG #17044 Federated Storage Engine not UTF8 clean
New test. Using hex - pasting various charsets in the terminal doesn't work.
federated.result:
BUG# 17044 Federated Storage Engine not UTF8 clean
New test results
mysql-test/r/federated.result:
BUG# 17044 Federated Storage Engine not UTF8 clean
New test results
Added HA_NULL_IN_KEY to table flags to allow for nullable unique indexes
and added test to verify
ha_federated.h:
BUG #15133 "unique index with nullable value not accepted in federated table"
added HA_NULL_IN_KEY to table flags to allow for nullable unique indexes
federated.test:
BUG #15133 "unique index with nullable value not accepted in federated table"
New test to show that nullable unique indexes work
federated.result:
BUG #15133 "unique index with nullable value not accepted in federated table"
New results for new test
sql/ha_federated.h:
BUG #15133 "unique index with nullable value not accepted in federated table"
added HA_NULL_IN_KEY to table flags to allow for nullable unique indexes
mysql-test/t/federated.test:
BUG #15133 "unique index with nullable value not accepted in federated table"
New test to show that nullable unique indexes work
mysql-test/r/federated.result:
BUG #15133 "unique index with nullable value not accepted in federated table"
New results for new test
Removed logic in ha_federated::write_row, which checks field query ids in the
loop which builds the query to run on the remote server.
mysql-test/r/federated.result:
"BUG #18764: Delete conditions causing inconsistencies in Federated tables"
New test results for test that verifies that one can insert to rows using
"insert into... select * from..", delete
them by id, then immediately insert them in the same way they were originally
inserted.
mysql-test/t/federated.test:
"BUG #18764: Delete conditions causing inconsistencies in Federated tables"
New test that verifies that one can insert to rows using
"insert into... select * from..", delete
them by id, then immediately insert them in the same way they were originally
inserted.
sql/ha_federated.cc:
"BUG #18764: Delete conditions causing inconsistencies in Federated tables"
Removed the logic in ha_federated::write_row which checked the query id of
each field and compared it to the thread query id.
Each field has a query id, and the problem used to be that if I did an insert
no fields specified, the field value would contain the last inserted value
for that field. The way to work around this was to see if the query id for
that field was the same as the current query id or of the rest of the field
query ids. If it wasn't, that told me the query didn't have the field value
specified.
Somewhere from when I wrote that code to now the problem went away, and there
was no longer the need for this logic.
Also removed the bool "has_fields", which needs not exist and using
table->s->fields is sufficient.
The Federated storage engine used Field methods that had arbitrary limits on
the amount of data they could process, which caused problems with data
over that limit (4K). By removing those Field methods and just using
features of the String class, we can avoid this problem.
mysql-test/r/federated.result:
Add new results
mysql-test/t/federated.test:
Add new regression test
sql/field.cc:
Remove unnecessary methods
sql/field.h:
Remove unnecessary methods
sql/ha_federated.cc:
Remove use of quote_data, use String::print() to get escaping of strings,
and don't bother with needs_quotes, just always quote values.
into bodhi.local:/opt/local/work/mysql-5.0-runtime-merge-41
myisam/mi_create.c:
Auto merged
mysql-test/r/myisam.result:
Auto merged
mysql-test/t/myisam.test:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
support-files/mysql.spec.sh:
Auto merged
mysql-test/r/federated.result:
Manual merge.
mysql-test/t/federated.test:
Manual merge.
into mysql.com:/home/dlenev/mysql-5.0-bg18437-3
mysql-test/t/federated.test:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/item.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_update.cc:
Auto merged
mysql-test/r/federated.result:
Manual merge.
NDB table".
SQL-layer was not marking fields which were used in triggers as such. As
result these fields were not always properly retrieved/stored by handler
layer. So one might got wrong values or lost changes in triggers for NDB,
Federated and possibly InnoDB tables.
This fix solves the problem by marking fields used in triggers
appropriately.
Also this patch contains the following cleanup of ha_ndbcluster code:
We no longer rely on reading LEX::sql_command value in handler in order
to determine if we can enable optimization which allows us to handle REPLACE
statement in more efficient way by doing replaces directly in write_row()
method without reporting error to SQL-layer.
Instead we rely on SQL-layer informing us whether this optimization
applicable by calling handler::extra() method with
HA_EXTRA_WRITE_CAN_REPLACE flag.
As result we no longer apply this optimzation in cases when it should not
be used (e.g. if we have on delete triggers on table) and use in some
additional cases when it is applicable (e.g. for LOAD DATA REPLACE).
Finally this patch includes fix for bug#20728 "REPLACE does not work
correctly for NDB table with PK and unique index".
This was yet another problem which was caused by improper field mark-up.
During row replacement fields which weren't explicity used in REPLACE
statement were not marked as fields to be saved (updated) so they have
retained values from old row version. The fix is to mark all table
fields as set for REPLACE statement. Note that in 5.1 we already solve
this problem by notifying handler that it should save values from all
fields only in case when real replacement happens.
include/my_base.h:
Added HA_EXTRA_WRITE_CAN_REPLACE, HA_EXTRA_WRITE_CANNOT_REPLACE - new
parameters for ha_extra() method. We use them to inform handler that
write_row() which tries to insert new row into the table and encounters
some already existing row with same primary/unique key can replace old
row with new row instead of reporting error.
mysql-test/r/federated.result:
Additional test for bug#18437 "Wrong values inserted with a before update
trigger on NDB table".
mysql-test/r/ndb_replace.result:
Added test for bug #20728 "REPLACE does not work correctly for NDB table
with PK and unique index". Updated wrong results from older test.
mysql-test/t/federated.test:
Additional test for bug#18437 "Wrong values inserted with a before update
trigger on NDB table".
mysql-test/t/ndb_replace.test:
Added test for bug #20728 "REPLACE does not work correctly for NDB table
with PK and unique index".
sql/ha_ndbcluster.cc:
We no longer rely on reading LEX::sql_command value in handler in order
to determine if we can enable optimization which allows us to handle REPLACE
statement in more efficient way by doing replaces directly in write_row()
method without reporting error to SQL-layer.
Instead we rely on SQL-layer informing us whether this optimization
applicable by calling handler::extra() method with
HA_EXTRA_WRITE_CAN_REPLACE flag.
As result we no longer apply this optimization in cases when it should not
be used (e.g. if we have on delete triggers on table) and use in some
additional cases when it is applicable (e.g. for LOAD DATA REPLACE).
sql/item.cc:
Item_trigger_field::setup_field():
Added comment explaining why we don't set Field::query_id in this method.
sql/mysql_priv.h:
mysql_alter_table() function no longer takes handle_duplicates argument.
Added declaration of mark_fields_used_by_triggers_for_insert_stmt() function.
sql/sql_delete.cc:
Mark fields which are used by ON DELETE triggers so handler will retrieve
values for these fields.
sql/sql_insert.cc:
Explicitly inform handler that we are doing REPLACE (using ha_extra() method)
in cases when it can promote insert operation done by write_row() to replace.
Also when we do REPLACE we want to store values for all columns so we should
inform handler about it.
Finally we should mark fields used by ON UPDATE/ON DELETE triggers as such
so handler can properly retrieve/restore values in these fields during
execution of REPLACE and INSERT ... ON DUPLICATE KEY UPDATE statements.
sql/sql_load.cc:
Explicitly inform handler that we are doing LOAD DATA REPLACE (using
ha_extra() method) in cases when it can promote insert operation done by
write_row() to replace.
Also when we do replace we want to save (replace) values for all columns
so we should inform handler about it.
Finally to properly execute LOAD DATA for table with triggers we should
mark fields used by ON INSERT triggers as such so handler can properly
store values for these fields.
sql/sql_parse.cc:
mysql_alter_table() function no longer takes handle_duplicates argument.
sql/sql_table.cc:
Got rid of handle_duplicates argument in mysql_alter_table() and
copy_data_between_tables() functions. These functions were always
called with handle_duplicates == DUP_ERROR and thus contained dead
(and probably incorrect) code.
sql/sql_trigger.cc:
Added Table_triggers_list::mark_fields_used() method which is used to mark
fields read/set by triggers as such so handlers will be able properly
retrieve/store values in these fields.
sql/sql_trigger.h:
Table_triggers_list:
Added mark_fields_used() method which is used to mark fields read/set by
triggers as such so handlers will be able properly retrieve/store values
in these fields. To implement this method added 'trigger_fields' member
which is array of lists linking items for all fields used in triggers
grouped by event and action time.
sql/sql_update.cc:
Mark fields which are used by ON UPDATE triggers so handler will retrieve
and save values for these fields.
mysql-test/r/ndb_trigger.result:
Added test for bug#18437 "Wrong values inserted with a before update trigger
on NDB table".
mysql-test/t/ndb_trigger.test:
Added test for bug#18437 "Wrong values inserted with a before update trigger
on NDB table".
mysql-test/t/federated.test:
Use --replace_result to make test work on non-standard ports.
mysql-test/r/federated.result:
Use --replace_result to make test work on non-standard ports.
into mysql.com:/home/mydev/mysql-5.0-bug11824
configure.in:
Auto merged
mysql-test/r/federated.result:
Auto merged
mysql-test/t/federated.test:
Auto merged
sql/ha_federated.cc:
Auto merged
sql/mysqld.cc:
Auto merged
Pushbuild fixes to result file, test, and header file for federated.
mysql-test/r/federated.result:
BUG #19773
Pushbuild fixes - result file had hard-coded port
mysql-test/t/federated.test:
BUG #19773
Pushbuild fixes Test was missing --replace_result
sql/ha_federated.h:
BUG #19773
HPUX and Windows failed with variable named row and *row in method declaration
Final-review fixes per Monty, pre-push. OK'd for
push. Please see each file's comments.
mysql-test/r/federated.result:
BUG #19773
Results for multi-table deletes, updates
mysql-test/t/federated.test:
BUG #19773
Test multi table update and delete. Added drop table to end of previous test.
sql/ha_federated.cc:
BUG #19773
Post-review changes, per Monty. 3rd patch, OK'd for push.
- Added index_read_idx_with_result_set, which uses the result set passed to it
- Hash by entire connection scheme
- Protected store_result result set for table scan by adding a method result set
to index_read_idx and index_read which is passed to index_read_with_result, which
in turn iterates over the single record via read_next.
This is a change from having two result sets in the first two patches.
This keeps the code clean and avoids the need for yet another result set.
- Rewrote ::position and ::rnd_pos to store position - if primary key use
primary key, if not, use record buffer.
- Rewrote get_share to store hash with connect string vs. table name
- delete_row added subtration of "records" by affected->rows
- Added read_next to handle what rnd_next used to do (converting raw record
to query and vice versa)
- Removed many DBUG_PRINT lines
- Removed memset initialisation since subsequent loop accomplishes
- Removed un-necessary mysql_free_result lines
sql/ha_federated.h:
BUG #19773
Fixed "SET " to " SET " to make sure built statements are built with
"UPDATE `t1` SET .." instead of "UPDATE `t1`SET"
When building the UPDATE query to send to the remote server, the
federated storage engine built the query incorrectly if it was updating
a field to be NULL.
Thanks to Bjrn Steinbrink for an initial patch for the problem.
mysql-test/r/federated.result:
Add new results
mysql-test/t/federated.test:
Add new regression test
sql/ha_federated.cc:
Fix logic of how fields are added to SET and WHERE clauses of an
UPDATE statement. Fields that were NULL were being handled incorrectly.
Also reorganizes the code a little bit so the update of the two
clauses is consistent.
- Always make rnd_pos reposition the cursor in the fetched result set.
mysql-test/r/federated.result:
Update test result
mysql-test/t/federated.test:
Add test for bug#17377
sql/ha_federated.cc:
Remove the "scan_flag" variable. rnd_pos should always move to a new position in the result set.
The "scan" flag in rnd_init will protect from the old result set being
closed and a new fecthed. I think the "scan_flag" was added before check of the "scan" argument in rnd_init was added.
sql/ha_federated.h:
Remove class variable "scan_flag"
mysql-test/t/federated.test:
Fix missing --replace_result on $SLAVE_MYPORT to work with MTR_BUILD_THREAD.
mysql-test/r/federated.result:
Fix missing --replace_result on $SLAVE_MYPORT to work with MTR_BUILD_THREAD.
Added fixes to make last_insert_id() to work.
mysql-test/r/federated.result:
BUG #14768
New test results for last_insert_id()
mysql-test/t/federated.test:
BUG #14768
Tests for last_insert_id()
sql/ha_federated.cc:
BUG# 14768
* Added code to set last_insert_id()
* Added code to free share->scheme
sql/ha_federated.h:
BUG #14768
New method for setting last_insert_id()
Added FIELD_TYPE_BIT to field method 'needs_quotes' to make BIT columns
work.
mysql-test/r/federated.result:
BUG# 14532
Test fix by creating table with bit column and inserting,selecting
mysql-test/t/federated.test:
BUG# 14532
Test fix by creating table with bit column and inserting,selecting
sql/field.cc:
BUG #14532
Just needed to quote/escape bit field, add FIELD_TYPE_BIT to switch
into mysql.com:/usr/home/bar/mysql-5.0.b9278
mysql-test/r/alter_table.result:
Auto merged
mysql-test/r/cast.result:
Auto merged
mysql-test/r/federated.result:
Auto merged
mysql-test/t/alter_table.test:
Auto merged
mysql-test/t/cast.test:
Auto merged
mysql-test/t/federated.test:
Auto merged
(problem found by kent)
mysql-test/r/federated.result:
replace port number with a named identifier
mysql-test/t/federated.test:
add call to replace the resulting display of the port number with a string
mysql-test/r/federated.result:
test results for SHOW CREATE TABLE
mysql-test/t/federated.test:
added test for SHOW CREATE TABLE
sql/sql_show.cc:
added connect_string for SHOW CREATE TABLE
BUG#13108
mysql-test/r/federated.result:
added test results for federated alter table
mysql-test/t/federated.test:
added test for federated alter table
sql/examples/ha_example.cc:
supports table re-creation
sql/examples/ha_tina.cc:
supports table re-creation
sql/ha_blackhole.cc:
supports table re-creation
sql/ha_federated.cc:
added flag for not supporting alter
sql/ha_heap.cc:
supports table recreation
sql/ha_myisam.cc:
supports table recreation
sql/ha_myisammrg.cc:
supports table re-creation
sql/handler.cc:
implemented flag check function
sql/handler.h:
added additional handlerton flags
created a function to test flags
replace ha_supports_generate macro with call to flag check
sql/sql_delete.cc:
replaced ha_supports_generate with handlerton flag check
sql/sql_table.cc:
added check for handlerton check for alter support
(per Monty's patch).
Remove references to the "COMMENT" field.
WL#2414
mysql-test/r/federated.result:
alter from "COMMENT=" to "CONNECTION="
mysql-test/r/federated_archive.result:
change "COMMENT=" to "CONNECTION="
mysql-test/t/federated.test:
change from "COMMENT=" to "CONNECTION="
mysql-test/t/federated_archive.test:
change from "COMMENT=" to "CONNECTION="
sql/ha_federated.cc:
Change parsing of char* table->s->comment to LEX_STRING table->s->connect_string
(per Monty's patch)
sql/handler.h:
added LEX_STRING "connection_string"
(per Monty's patch)
sql/sql_yacc.yy:
added setting of "connect_string" string and length
sql/table.cc:
Modifying frm file to store connecting information (code change came from Monty).
sql/table.h:
added connect_string
sql/unireg.cc:
Storing information on connection_string (code came from Monty).
as well as changes to the test.
mysql-test/r/federated.result:
New test results
mysql-test/t/federated.test:
Removed explains per brian's suggestion since on his 64-bit amd, you get
different information, something to be ironed out later, as well as it
having nothing to do with federated.
sql/ha_federated.cc:
- Eric Herman's implementation of repair and optimize!!!
- Eric's changes to 1EQ0 to FALSE
sql/ha_federated.h:
Eric's addition of LEN for each SQL string tokens.
deallocation cleanup
mysql-test/r/federated.result:
new test results
mysql-test/t/federated.test:
New tests, and added explains per Timour's suggestion. This will keep
track of whether changes have been made to the optimiser that might affect
Federated.
Also changed the error codes to federated error codes in the error tests
sql/ha_federated.cc:
1. Not using MAX_REMOTE_SIZE, so removed
2. Changed all defines that were IO_SIZE to FEDERATED_QUERY_BUFFER_SIZE
3. Now using Federated Error Codes
4. Implemented ::info (gets valid 'records' number)
5. Implemented ::read_range_first - now uses indexes in range operations
6. Better allocation in get_share
7. Cleaned up memory bug in get_share
8. Better initial query "SELECT * FROM t1 WHERE 1=0" for check_foreign_data_src
9. emit_key_part_name and emit_key_part_element for read_range_first to not
have redundancy
10. Made sure all 'append's pass length, and use append("") to ensure proper
null termination of strings being built.
11. Better message creation. If ER_QUERY_ON_FOREIGN_DATA_SRC, I also pass
the actual error code and message from the foreign data src.
12. Cleaned up how the result set and share->scheme is freed.
sql/share/errmsg.txt:
New Federated error messages that are more tailored to the type of information
we want to see when federated has an error.
mysql-test/include/federated.inc:
New bitkeeper file, include file for separating setup from main test suite
mysql-test/include/federated_cleanup.inc:
New BitKeeper file ``mysql-test/include/federated_cleanup.inc''
sql/ha_federated.h:
Added comments where needed, one was already commented about
mysql-test/r/federated.result:
added explain results to join test results per Timour's request.
mysql-test/t/federated.test:
Added explain to test per Timour's request
sql/ha_federated.cc:
better comment to explain why we need table->status set to 0
mysql-test/r/federated.result:
new join test results
mysql-test/t/federated.test:
new simple join tests (more to come with subsequent commits)
sql/ha_federated.cc:
This fixes joins not working. Monty discussed that having to deal
with table->status needs to be moved from the handler/storage engine
to a higher level
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
mysql-test/r/federated.result:
made sure result has SLAVE_PORT!
mysql-test/t/federated.test:
added --replace_result to a table creation that I forgot to add before
Changes to a test with a update to a table with 1001 columns, the last being a blob.
On HP, the test worked properly, but on other OSs, there's a problem with using the
blob column in an update where clause. The field method val_string(String *, char *)
should work, but doesn't seem to deal with blobd, and for some reason, cannot get
the correct value of the blob column from the byte pointer in update_row, "*old_data"
which is a byte pointer to the row in mysql format, that will be replaced with
"*new_data" (which conveniently has a field pointer to use to get values from).
Will document this.
mysql-test/r/federated.result:
New test results. These results have been tested on production and hpita2 successfully.
mysql-test/t/federated.test:
Changed blob column in this test due to some issues with HPUX handling it correctly
and other OSs not. Will document this (blobs in update where clause)
Konstja and Georg, change sets 1.1806, 1.1805. These changes has been successfully
tested on both my own workstation (Suse 9.0) and production.mysql.com.
mysql-test/r/federated.result:
new test results for error handling tests.
mysql-test/t/federated.test:
new error handling tests
sql/ha_federated.cc:
- check_foreign_data source added
- table names now enclosed in '`' to allow for '%' or other characters
- better error handling
- mysql_init now checked to see if it returns true/false, error out if false (Georg)
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
Patch #2, all coding style changes per Kostja's review
(as requested to keep style changes separate from functionality changes),
as well as changes to the test suit to no longer use hard-coded port
values in foreign table creation statement
mysql-test/r/federated.result:
Now using SLAVE_PORT as opposed to hard-coded port value
mysql-test/t/federated.test:
- changed test to use SLAVE_MYPORT
- made all standard SQL uppercase
- made test 80 cols, except blob inserts of text
sql/ha_federated.cc:
- made sure all comments and style changes were according to Kostja's
review
- combined parse_url error handling into a 'error:' block, took out
triple exclamation points.
- clarified commented documentation
- got rid of all trailing spaces