Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
84f3623b
Commit
84f3623b
authored
Jul 21, 2006
by
ingo/mydev@chilla.local
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
After merge fixes.
parent
18a76a95
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
27 deletions
+27
-27
mysql-test/r/federated.result
mysql-test/r/federated.result
+16
-16
mysql-test/t/federated.test
mysql-test/t/federated.test
+1
-0
sql/ha_federated.cc
sql/ha_federated.cc
+10
-11
No files found.
mysql-test/r/federated.result
View file @
84f3623b
...
@@ -1603,6 +1603,22 @@ fld_cid fld_name fld_parentid fld_delt
...
@@ -1603,6 +1603,22 @@ fld_cid fld_name fld_parentid fld_delt
5 Torkel 0 0
5 Torkel 0 0
DROP TABLE federated.t1;
DROP TABLE federated.t1;
DROP TABLE federated.bug_17377_table;
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:SLAVE_PORT/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 table if exists federated.t1;
create table federated.t1 (a int, b int, c int);
create table federated.t1 (a int, b int, c int);
drop table if exists federated.t1;
drop table if exists federated.t1;
...
@@ -1717,22 +1733,6 @@ id c1 c2
...
@@ -1717,22 +1733,6 @@ id c1 c2
9 abc ppc
9 abc ppc
drop table federated.t1, federated.t2;
drop table federated.t1, federated.t2;
drop table federated.t1, federated.t2;
drop table federated.t1, federated.t2;
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:SLAVE_PORT/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 TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
DROP DATABASE IF EXISTS federated;
DROP TABLE IF EXISTS federated.t1;
DROP TABLE IF EXISTS federated.t1;
...
...
mysql-test/t/federated.test
View file @
84f3623b
...
@@ -1396,6 +1396,7 @@ drop table t1;
...
@@ -1396,6 +1396,7 @@ drop table t1;
# for ON INSERT triggers only. Tests for other types of triggers reside
# for ON INSERT triggers only. Tests for other types of triggers reside
# in ndb_trigger.test.
# in ndb_trigger.test.
#
#
connection
slave
;
--
disable_warnings
--
disable_warnings
drop
table
if
exists
federated
.
t1
;
drop
table
if
exists
federated
.
t1
;
--
enable_warnings
--
enable_warnings
...
...
sql/ha_federated.cc
View file @
84f3623b
...
@@ -1775,7 +1775,7 @@ int ha_federated::repair(THD* thd, HA_CHECK_OPT* check_opt)
...
@@ -1775,7 +1775,7 @@ int ha_federated::repair(THD* thd, HA_CHECK_OPT* check_opt)
it.
it.
Keep in mind that the server can do updates based on ordering if an ORDER BY
Keep in mind that the server can do updates based on ordering if an ORDER BY
clause was used. Consecutive ordering is not guar
e
nteed.
clause was used. Consecutive ordering is not guar
a
nteed.
Currently new_data will not have an updated auto_increament record, or
Currently new_data will not have an updated auto_increament record, or
and updated timestamp field. You can do these for federated by doing these:
and updated timestamp field. You can do these for federated by doing these:
if (table->timestamp_on_update_now)
if (table->timestamp_on_update_now)
...
@@ -1847,6 +1847,9 @@ int ha_federated::update_row(const byte *old_data, byte *new_data)
...
@@ -1847,6 +1847,9 @@ int ha_federated::update_row(const byte *old_data, byte *new_data)
{
{
if
(
bitmap_is_set
(
table
->
write_set
,
(
*
field
)
->
field_index
))
if
(
bitmap_is_set
(
table
->
write_set
,
(
*
field
)
->
field_index
))
{
{
update_string
.
append
((
*
field
)
->
field_name
);
update_string
.
append
(
FEDERATED_EQ
);
if
((
*
field
)
->
is_null
())
if
((
*
field
)
->
is_null
())
update_string
.
append
(
FEDERATED_NULL
);
update_string
.
append
(
FEDERATED_NULL
);
else
else
...
@@ -1859,11 +1862,7 @@ int ha_federated::update_row(const byte *old_data, byte *new_data)
...
@@ -1859,11 +1862,7 @@ int ha_federated::update_row(const byte *old_data, byte *new_data)
field_value
.
length
(
0
);
field_value
.
length
(
0
);
tmp_restore_column_map
(
table
->
read_set
,
old_map
);
tmp_restore_column_map
(
table
->
read_set
,
old_map
);
}
}
update_string
.
append
((
*
field
)
->
field_name
);
update_string
.
append
(
FEDERATED_EQ
);
update_string
.
append
(
new_field_value
);
update_string
.
append
(
FEDERATED_COMMA
);
update_string
.
append
(
FEDERATED_COMMA
);
new_field_value
.
length
(
0
);
}
}
if
(
bitmap_is_set
(
table
->
read_set
,
(
*
field
)
->
field_index
))
if
(
bitmap_is_set
(
table
->
read_set
,
(
*
field
)
->
field_index
))
...
@@ -1874,11 +1873,11 @@ int ha_federated::update_row(const byte *old_data, byte *new_data)
...
@@ -1874,11 +1873,11 @@ int ha_federated::update_row(const byte *old_data, byte *new_data)
else
else
{
{
where_string
.
append
(
FEDERATED_EQ
);
where_string
.
append
(
FEDERATED_EQ
);
(
*
field
)
->
val_str
(
&
old_
field_value
,
(
*
field
)
->
val_str
(
&
field_value
,
(
char
*
)
(
old_data
+
(
*
field
)
->
offset
()));
(
char
*
)
(
old_data
+
(
*
field
)
->
offset
()));
(
*
field
)
->
quote_data
(
&
old_
field_value
);
(
*
field
)
->
quote_data
(
&
field_value
);
where_string
.
append
(
old_
field_value
);
where_string
.
append
(
field_value
);
old_
field_value
.
length
(
0
);
field_value
.
length
(
0
);
}
}
where_string
.
append
(
FEDERATED_AND
);
where_string
.
append
(
FEDERATED_AND
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment