1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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.


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.
This commit is contained in:
unknown
2006-07-12 16:33:29 -07:00
parent a7dddd3b67
commit abbf7ad014
5 changed files with 54 additions and 135 deletions

View File

@ -1733,6 +1733,19 @@ id val
2 0
drop table t1;
drop table t1;
create table t1 (a longblob not null);
create table t1
(a longblob not null) engine=federated
connection='mysql://root@127.0.0.1:SLAVE_PORT/test/t1';
insert into t1 values (repeat('a',5000));
select length(a) from t1;
length(a)
5000
select length(a) from t1;
length(a)
5000
drop table t1;
drop table t1;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
DROP TABLE IF EXISTS federated.t1;

View File

@ -1425,4 +1425,22 @@ drop table t1;
connection master;
drop table t1;
#
# Bug #17608: String literals lost during INSERT query on FEDERATED table
#
connection slave;
create table t1 (a longblob not null);
connection master;
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval create table t1
(a longblob not null) engine=federated
connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/test/t1';
insert into t1 values (repeat('a',5000));
select length(a) from t1;
connection slave;
select length(a) from t1;
drop table t1;
connection master;
drop table t1;
source include/federated_cleanup.inc;