Fixed problems in test suite where some test failed
Fixed access to not initialized memory in federated
Fixed access to not initialized memory when using BIT fields in internal temporary tables
cursors. This should fix Bug#11813 when InnoDB part is in
(tested with a draft patch).
The idea of the patch is that if a storage engine supports
consistent read views, we open one when open a cursor,
set is as the active view when fetch from the cursor, and close
together with cursor close.
The idea of the patch
is that every cursor gets its own lock id for table level locking.
Thus cursors are protected from updates performed within the same
connection. Additionally a list of transient (must be closed at
commit) cursors is maintained and all transient cursors are closed
when necessary. Lastly, this patch adds support for deadlock
timeouts to TLL locking when using cursors.
+ post-review fixes.
Added BLACKHOLE and FEDERATED storage engines for max builds
Some preparations for including yaSSL
ha_federated.cc:
Use local seach path for "mysql_priv.h"
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.
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
This is the first changeset of suggested changes recommended in Kostja's
review of my patch, 1.1846, which includes only functionality changes.
Style changes/Documentation patch to follow.
for bugs 8033, 8065, 8535, 8582
This particular changeset contains style changes per code review suggestions
and does not contain bug fixes in of itself.
ha_federated.h:
standardised code style to conform to internals.texi
ha_federated.cc:
more code standardisation to conform to internals.texi.
- casts
- declarations
- comments
- 80 char width
also, append using string1.append(string2) and not
string1.append(string2.c_ptr_quick())
This changeset/patch is on top of changesets 1.1814 and 1.1846
(for bugs 8033 and 8065) and now fixes bug 8535.
These changes have been built and tested successfully on build.mysql.com
handler.cc:
Added hooks for federated_db_init() and federated_db_end(),
as done with ha_archive_db does, per suggestion by Ingo in
code review of patch 1.1846.
ha_federated.h:
declaration of federated_db_init() and federated_db_end()
ha_federated.cc:
- Fixed some indentation problems from indent-ex (mainly to do with
cases where "variablename += value"
- Added federated_db_init() and federated_db_end(), as done with
archive, which also handler more elegantly one of the memory leaks
from bug 8033 where the federated_mutex was not freed
- Removed extrenous debug messages in parse_url()
- Fixed bug 8535, caused by NULL being quoted in write_row. This used to
work (incorrectly) but a recent change was made in the server that
exposed this
This patch contains all that my previous patch (1.1814) contained, with the addition of using cli_fetch_lengths for
handling binary data (Bar noted this on the review of 1.1814, Guilhem suggested using cli_fetch_lenghts by
making available via removal of static in method definition and declaration in mysql.h, but
Konstantin had some reservations, but he said to commit the patch using this anyway,
and I suppose this can be discussed. I abandoned 1.1814 because Monty made a couple
fixes to my code as well as formatting changes, and I thought it would just be easier
to hand-edit my changes into a fresh clone and then make a patch.
The reason for using cli_fetch_lengths is so that I can correctly get the length of
the field I am setting into the field. I was previously using 'strlen' but Bar pointed out this
won't correctly get the length of binary data and is also less effecient. Upon testing,
it was in fact verified that binary data in a blob table was being inserted correctly,
but not being retrieved correctly, all due to not having the correct value for the
field:
(*field)->store(row[x], strlen(row[x]), &my_charset_bin);
was changed to:
(*field)->store(row[x], lengths[x], &my_charset_bin);
lengths being a unsigned long pointer to the values of the field lengths from a
MYSQL_ROW.
Since the server doesn't have the function "mysql_fetch_lengths" available, I tried
to use "result->lengths", but this isn't set, so I finally successfully used
cli_fetch_lenghts, which does give the correct lengths, and now the binary data gets
retrieved correctly.
I've also run the code through indent-ex and am using Brian's vimrc to ensure correct formatting!
This code passes the entire test suite, without any errors or warning on both my
workstation and build.mysql.com
-New tests and results
logging_ok:
Logging to logging@openlogging.org accepted
ha_federated.h:
removed quote_data and type_quote (now in the Field class)
ha_federated.cc:
moved quote_data and type_quote to field class
field.h:
new methods quote_data and needs_quotes declared
field.cc:
new field class methods quote_data and needs_quotes (per Monty's request)
federated.test:
more tests, joins, index tests
have_federated_db.require:
new name of federated system var
federated.result:
new test results for federated handler
have_federated_db.inc:
changed name of variable in test due to change in vars
sql_analyse.cc:
over-ridden append_escaped to take (String *, char *, uint) per requirements of 'create_where_from_key' method in federated handler.
mysql_priv.h:
define over-ridden append_escaped to take arguments from 'create_where_from_key' method in federated handler
ha_federated.cc:
implemented "create_where_from_key" to deal properly with two-byte prefix and multi keys. Initial testing shows it works, but I still need to move quoting to field class and also look at changes per Segei's suggestions.
The test case does not currently work (I am comitting this so that Patrick will have a working copy).
I am going to look at the test case next. It is suspected that it is failing do to a change in mysql_test_run.