Commit graph

41 commits

Author SHA1 Message Date
patg@radha.local
7ce83bc36a federated.test:
fixed test to replace port to SLAVE_PORT in result file
federated.result:
  new result file
2006-11-29 13:56:59 -05:00
patg@radha.local
5f0fe17796 BUG# 17044 Federated Storage Engine not UTF8 clean
- 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
2006-11-15 21:24:58 -05:00
pgalbraith/patg@buffy.netfrastructure.com
cf8b64a114 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
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
2006-07-25 18:38:09 -04:00
patg@govinda.patg.net
71f5b4997a "BUG #18764: Delete conditions causing inconsistencies in Federated tables"
Post merge changes.
2006-07-18 18:41:36 -07:00
patg@govinda.patg.net
259f9bb0d7 Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-5.0-engines
into  govinda.patg.net:/home/patg/mysql-build/mysql-5.0-bug18764.2
2006-07-18 17:21:50 -07:00
patg@govinda.patg.net
51d8bcf627 "BUG #18764: Delete conditions causing inconsistencies in Federated tables"
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.
2006-07-17 16:45:04 -07:00
jimw@rama.(none)
c2d8b605f2 Bug #17608: String literals lost during INSERT query on FEDERATED table
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.
2006-07-12 16:33:29 -07:00
kostja@bodhi.local
f1d949a856 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-runtime-merge-41
2006-07-08 21:45:02 +04:00
dlenev@mysql.com
b429748fab Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  mysql.com:/home/dlenev/mysql-5.0-bg18437-3
2006-07-06 14:31:32 +04:00
dlenev@mysql.com
d4450e6696 Fix for bug#18437 "Wrong values inserted with a before update trigger on
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.
2006-07-02 01:51:10 +04:00
ingo@mysql.com
02c8e6b000 Fixed yet another forgotten port number replacement. 2006-06-29 14:03:53 +02:00
ingo@mysql.com
35a92af077 Merge mysql.com:/home/mydev/mysql-5.0--main
into  mysql.com:/home/mydev/mysql-5.0-bug11824
2006-06-29 13:43:56 +02:00
knielsen@mysql.com
86268a54df Fix test files to work with non-standard ports (MTR_BUILD_THREAD). 2006-06-29 10:35:16 +02:00
ingo@mysql.com
366cf25f4c Merge mysql.com:/home/mydev/mysql-5.0-amerge
into  mysql.com:/home/mydev/mysql-5.0-bug11824
2006-06-29 10:18:29 +02:00
jimw@mysql.com
afef612bd6 Merge bk-internal:/home/bk/mysql-5.0-engines
into  mysql.com:/home/jimw/my/mysql-5.0-16494
2006-06-28 12:26:21 -07:00
patg@govinda.patg.net
18d264a1ea BUG #19773
Pushbuild fixes to result file, test, and header file for federated.
2006-06-28 12:18:21 -07:00
patg@govinda.patg.net
d2df283b78 BUG #19773
Final-review fixes per Monty, pre-push. OK'd for 
push. Please see each file's comments.
2006-06-27 23:49:48 -07:00
jimw@mysql.com
a1c2dc5e6f Bug #16494: Updates that set a column to NULL fail sometimes
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 Bjšrn Steinbrink for an initial patch for the problem.
2006-06-26 16:59:52 -07:00
msvensson@devsrv-b.mysql.com
f2444c50fc Bug#17377 Federated Engine returns wrong Data, always the rows with the highest ID
- Always make rnd_pos reposition the cursor in the fetched result set.
2006-02-28 11:17:40 +01:00
knielsen@mysql.com
a002d316ed Fix missing --replace_result on $SLAVE_MYPORT in federated. 2006-01-31 09:15:28 +01:00
patg@govinda.patg.net
15ec4431bc BUG# 14768
Added fixes to make last_insert_id() to work.
2006-01-27 15:43:44 -08:00
patg@krsna.patg.net
d5b252e630 BUG# 14532
Post-review fixes
2005-10-31 17:26:45 -08:00
patg@krsna.patg.net
7b611b33f2 BUG #14532
Added FIELD_TYPE_BIT to field method 'needs_quotes' to make BIT columns
work.
2005-10-31 17:17:16 -08:00
bar@mysql.com
c229567887 Merge abarkov@bk-internal:/home/bk/mysql-5.0
into  mysql.com:/usr/home/bar/mysql-5.0.b9278
2005-10-13 19:19:05 +05:00
bar@mysql.com
39b0712cf7 type_binary.result, type_binary.test:
new file
mysql_fix_privilege_tables.sql, mysql_create_system_tables.sh:
  Adding true BINARY/VARBINARY: fixing "password" type, not to be 0x00-padding.
Many files:
  Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
  Adding true BINARY/VARBINARY: new pad_char structure member.
ctype-bin.c:
  Adding true BINARY/VARBINARY: new pad_char structure member.
  New strnxfrm, with two trailing length bytes.
field.cc:
  Adding true BINARY/VARBINARY.
2005-10-13 19:16:19 +05:00
eric@mysql.com
06043b519a replace port number with string identifier so that it may have different ports and still run
(problem found by kent)
2005-10-12 14:33:08 -07:00
eric@mysql.com
215ecd3322 BUG#13724 conditionally added CONNECTION='connect string' for SHOW CREATE TABLE 2005-10-10 17:41:36 -07:00
eric@mysql.com
5008a5f208 Move handler specific options into handlerton flag check
BUG#13108
2005-09-30 16:26:48 -07:00
eric@mysql.com
1a79e25537 Made changes to add federated CONNECTION information to the .frm file
(per Monty's patch).
Remove references to the "COMMENT" field.
WL#2414
2005-09-12 18:02:17 -07:00
patg@radha.local
e2d8644053 Eric's implentation of OPTIMIZE TABLE and REPAIR TABLE,
as well as changes to the test.
2005-07-19 03:04:51 +02:00
patg@krsna.patg.net
db1fb6a7e5 This is the same patch as 1.1937, with small variable declaration changes, memory
deallocation cleanup
2005-07-15 17:33:47 -07:00
patg@radha.local
d3d727e328 Comment and test changes per review request by Timour. All tests pass on production with this code. 2005-05-27 22:07:46 +02:00
patg@radha.local
a6af23a046 changes to fix joins not working (bug #10848). New tests, as well as table->status being set in index_read_idx 2005-05-25 02:15:09 +02:00
patg@krsna.
0ae33dfd36 Federated Storage Handler - test and result fix. 2005-03-20 23:17:35 -08:00
patg@krsna.
dd669983db WL #2094 Federated Storage Engine
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.
2005-03-15 18:49:58 -08:00
patg@krsna.
24bc862456 This changeset contains changes approved in code review by
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.
2005-03-15 00:32:21 -08:00
patg@krsna.patg.net
02a25fd48a WL# 2094 Federated Storage Handler
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
2005-02-23 00:38:29 -08:00
patg@krsna.patg.net
0a48c5b5c2 WL# 2094
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
2005-02-06 09:40:07 -08:00
patg@pc248.lfp.kcls.org
1da60b9f45 -Added quote_data and needs_quotes (moved from federated handler.
-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.
2005-01-20 18:36:40 -08:00
patg@patrick-galbraiths-computer.local
dac98f9b45 WL# 2094 Federated Storage Handler, added fixes per suggestions by Bar and Antony 2004-12-16 19:08:32 -08:00
patg@patrick-galbraiths-computer.local
301c493252 First commit to mysql-5.0 tree to include MySQL Federated Storage Handler. This includes both the source and header files, test (results, test, require), and modifications to server and handler base files, and autoconf modifications to properly build federated handler. 2004-12-11 12:03:51 -08:00