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
11c17294
Commit
11c17294
authored
Nov 30, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/hf/work/32624/my50-32624
into mysql.com:/home/hf/work/mrg/my50-mrg
parents
1d062682
104bba77
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
161 additions
and
0 deletions
+161
-0
mysql-test/r/federated.result
mysql-test/r/federated.result
+111
-0
mysql-test/t/federated.test
mysql-test/t/federated.test
+31
-0
sql/ha_federated.cc
sql/ha_federated.cc
+18
-0
sql/ha_federated.h
sql/ha_federated.h
+1
-0
No files found.
mysql-test/r/federated.result
View file @
11c17294
...
...
@@ -1934,6 +1934,117 @@ select * from federated.t2;
a
1
drop table federated.t1, federated.t2;
create table t1 (a varchar(256));
drop view if exists v1;
create view v1 as select a from t1;
create table t1
(a varchar(256)) engine=federated
connection='mysql://root@127.0.0.1:SLAVE_PORT/test/v1';
select 1 from t1 order by a;
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
drop table t1;
drop table t1;
drop view v1;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
DROP TABLE IF EXISTS federated.t1;
...
...
mysql-test/t/federated.test
View file @
11c17294
...
...
@@ -1686,4 +1686,35 @@ insert into federated.t1 (a) values (1);
select
*
from
federated
.
t2
;
drop
table
federated
.
t1
,
federated
.
t2
;
#
# Bug #32374 crash with filesort when selecting from federated table and view
#
connection
slave
;
create
table
t1
(
a
varchar
(
256
));
--
disable_warnings
drop
view
if
exists
v1
;
--
enable_warnings
create
view
v1
as
select
a
from
t1
;
--
disable_query_log
let
$n
=
100
;
while
(
$n
)
{
insert
into
t1
values
(
repeat
(
'a'
,
200
));
dec
$n
;
}
--
enable_query_log
connection
master
;
--
replace_result
$SLAVE_MYPORT
SLAVE_PORT
eval
create
table
t1
(
a
varchar
(
256
))
engine
=
federated
connection
=
'mysql://root@127.0.0.1:$SLAVE_MYPORT/test/v1'
;
select
1
from
t1
order
by
a
;
drop
table
t1
;
connection
slave
;
drop
table
t1
;
drop
view
v1
;
source
include
/
federated_cleanup
.
inc
;
sql/ha_federated.cc
View file @
11c17294
...
...
@@ -2166,6 +2166,24 @@ error:
}
/*
This method is used exlusevely by filesort() to check if we
can create sorting buffers of necessary size.
If the handler returns more records that it declares
here server can just crash on filesort().
We cannot guarantee that's not going to happen with
the FEDERATED engine, as we have records==0 always if the
client is a VIEW, and for the table the number of
records can inpredictably change during execution.
So we return maximum possible value here.
*/
ha_rows
ha_federated
::
estimate_rows_upper_bound
()
{
return
HA_POS_ERROR
;
}
/* Initialized at each key walk (called multiple times unlike rnd_init()) */
int
ha_federated
::
index_init
(
uint
keynr
)
...
...
sql/ha_federated.h
View file @
11c17294
...
...
@@ -277,6 +277,7 @@ public:
int
update_row
(
const
byte
*
old_data
,
byte
*
new_data
);
int
delete_row
(
const
byte
*
buf
);
int
index_init
(
uint
keynr
);
ha_rows
estimate_rows_upper_bound
();
int
index_read
(
byte
*
buf
,
const
byte
*
key
,
uint
key_len
,
enum
ha_rkey_function
find_flag
);
int
index_read_idx
(
byte
*
buf
,
uint
idx
,
const
byte
*
key
,
...
...
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