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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
06ea60d2
Commit
06ea60d2
authored
Aug 21, 2012
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make ha_cassandra work with filesort().
parent
81817412
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
5 deletions
+37
-5
mysql-test/r/cassandra.result
mysql-test/r/cassandra.result
+13
-0
mysql-test/t/cassandra.test
mysql-test/t/cassandra.test
+10
-0
storage/cassandra/ha_cassandra.cc
storage/cassandra/ha_cassandra.cc
+4
-1
storage/cassandra/ha_cassandra.h
storage/cassandra/ha_cassandra.h
+10
-4
No files found.
mysql-test/r/cassandra.result
View file @
06ea60d2
...
@@ -45,4 +45,17 @@ rowkey11 NULL NULL
...
@@ -45,4 +45,17 @@ rowkey11 NULL NULL
delete from t1;
delete from t1;
select * from t1;
select * from t1;
rowkey data1 data2
rowkey data1 data2
#
# A query with filesort (check that table_flags() & HA_REC_NOT_IN_SEQ,
# also check ::rnd_pos()
#
insert into t1 values ('rowkey10', 'data1-value', 123456);
insert into t1 values ('rowkey11', 'data1-value2', 34543);
insert into t1 values ('rowkey12', 'data1-value3', 454);
select * from t1 order by data2;
rowkey data1 data2
rowkey12 data1-value3 454
rowkey11 data1-value2 34543
rowkey10 data1-value 123456
delete from t1;
drop table t1;
drop table t1;
mysql-test/t/cassandra.test
View file @
06ea60d2
...
@@ -84,6 +84,16 @@ select * from t1;
...
@@ -84,6 +84,16 @@ select * from t1;
delete
from
t1
;
delete
from
t1
;
select
*
from
t1
;
select
*
from
t1
;
--
echo
#
--
echo
# A query with filesort (check that table_flags() & HA_REC_NOT_IN_SEQ,
--
echo
# also check ::rnd_pos()
--
echo
#
insert
into
t1
values
(
'rowkey10'
,
'data1-value'
,
123456
);
insert
into
t1
values
(
'rowkey11'
,
'data1-value2'
,
34543
);
insert
into
t1
values
(
'rowkey12'
,
'data1-value3'
,
454
);
select
*
from
t1
order
by
data2
;
delete
from
t1
;
drop
table
t1
;
drop
table
t1
;
############################################################################
############################################################################
...
...
storage/cassandra/ha_cassandra.cc
View file @
06ea60d2
...
@@ -755,7 +755,10 @@ int ha_cassandra::rnd_init(bool scan)
...
@@ -755,7 +755,10 @@ int ha_cassandra::rnd_init(bool scan)
bool
bres
;
bool
bres
;
DBUG_ENTER
(
"ha_cassandra::rnd_init"
);
DBUG_ENTER
(
"ha_cassandra::rnd_init"
);
if
(
!
scan
)
if
(
!
scan
)
DBUG_RETURN
(
HA_ERR_WRONG_COMMAND
);
{
/* Prepare for rnd_pos() calls. We don't need to anything. */
DBUG_RETURN
(
0
);
}
se
->
clear_read_columns
();
se
->
clear_read_columns
();
for
(
uint
i
=
1
;
i
<
table
->
s
->
fields
;
i
++
)
for
(
uint
i
=
1
;
i
<
table
->
s
->
fields
;
i
++
)
...
...
storage/cassandra/ha_cassandra.h
View file @
06ea60d2
...
@@ -78,11 +78,17 @@ class ha_cassandra: public handler
...
@@ -78,11 +78,17 @@ class ha_cassandra: public handler
ulonglong
table_flags
()
const
ulonglong
table_flags
()
const
{
{
/*
/*
HA_BINLOG_STMT_CAPABLE
We are saying that this engine is just statement capable to have
We are saying that this engine is just statement capable to have
an engine that can only handle statement-based logging. This is
an engine that can only handle statement-based logging. This is
used in testing.
used in testing.
HA_REC_NOT_IN_SEQ
If we don't set it, filesort crashes, because it assumes rowids are
1..8 byte numbers
*/
*/
return
HA_BINLOG_STMT_CAPABLE
;
return
HA_BINLOG_STMT_CAPABLE
|
HA_REC_NOT_IN_SEQ
;
}
}
/** @brief
/** @brief
...
...
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