summaryrefslogtreecommitdiff
path: root/mysql-test/r/federated.result
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2006-06-26 16:59:52 -0700
committerunknown <jimw@mysql.com>2006-06-26 16:59:52 -0700
commitf3c3c9c34189a5ccdacf62aec50e55c197223148 (patch)
tree84961f642176c7b7f9ebabf891de929435990458 /mysql-test/r/federated.result
parentc3cb46908c30895e0aafa0f7602370240a3c5a98 (diff)
downloadmariadb-git-f3c3c9c34189a5ccdacf62aec50e55c197223148.tar.gz
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. 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.
Diffstat (limited to 'mysql-test/r/federated.result')
-rw-r--r--mysql-test/r/federated.result16
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/r/federated.result b/mysql-test/r/federated.result
index f11da4ee62f..48f20625826 100644
--- a/mysql-test/r/federated.result
+++ b/mysql-test/r/federated.result
@@ -1601,6 +1601,22 @@ fld_cid fld_name fld_parentid fld_delt
5 Torkel 0 0
DROP TABLE federated.t1;
DROP TABLE federated.bug_17377_table;
+create table t1 (id int not null auto_increment primary key, val int);
+create table t1
+(id int not null auto_increment primary key, val int) engine=federated
+connection='mysql://root@127.0.0.1:9308/test/t1';
+insert into t1 values (1,0),(2,0);
+update t1 set val = NULL where id = 1;
+select * from t1;
+id val
+1 NULL
+2 0
+select * from t1;
+id val
+1 NULL
+2 0
+drop table t1;
+drop table t1;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
DROP TABLE IF EXISTS federated.t1;