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
0362968b
Commit
0362968b
authored
Sep 26, 2012
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cassandra SE:
- Add a test for ALTER TABLE
parent
344c0ea4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
4 deletions
+29
-4
mysql-test/t/cassandra.test
mysql-test/t/cassandra.test
+26
-0
storage/cassandra/cassandra_se.cc
storage/cassandra/cassandra_se.cc
+2
-2
storage/cassandra/ha_cassandra.cc
storage/cassandra/ha_cassandra.cc
+1
-2
No files found.
mysql-test/t/cassandra.test
View file @
0362968b
...
...
@@ -78,6 +78,8 @@ insert into cf11 (rowkey, decimal_col) values ('val_0.5', 0.5);
insert
into
cf11
(
rowkey
,
decimal_col
)
values
(
'val_1.5'
,
1.5
);
insert
into
cf11
(
rowkey
,
decimal_col
)
values
(
'val_1234'
,
1234
);
create
columnfamily
cf12
(
rowkey
varchar
primary
key
,
decimal_col
decimal
);
EOF
--
error
0
,
1
,
2
--
system
cqlsh
-
3
-
f
$MYSQLTEST_VARDIR
/
cassandra_test_init
.
cql
...
...
@@ -464,6 +466,30 @@ select * from t2;
drop
table
t2
;
--
echo
#
--
echo
# Check whether changing parameters with ALTER TABLE works.
--
echo
#
CREATE
TABLE
t2
(
rowkey
varchar
(
32
)
PRIMARY
KEY
,
decimal_col
varbinary
(
32
))
ENGINE
=
CASSANDRA
thrift_host
=
'localhost'
keyspace
=
'mariadbtest2'
column_family
=
'cf11'
;
--
error
ER_INTERNAL_ERROR
alter
table
t2
column_family
=
'cf9'
;
drop
table
t2
;
CREATE
TABLE
t2
(
rowkey
varchar
(
32
)
PRIMARY
KEY
,
decimal_col
varbinary
(
32
))
ENGINE
=
CASSANDRA
thrift_host
=
'localhost'
keyspace
=
'mariadbtest2'
column_family
=
'cf11'
;
let
$c1
=
`select variable_value from information_schema.global_status
where variable_name like 'cassandra_row_inserts'`
;
alter
table
t2
column_family
=
'cf12'
;
let
$c2
=
`select variable_value from information_schema.global_status
where variable_name like 'cassandra_row_inserts'`
;
--
disable_query_log
eval
select
(
$c2
-
$c1
)
as
'Writes made during ALTER TABLE'
;
--
enable_query_log
############################################################################
## Cassandra cleanup
############################################################################
...
...
storage/cassandra/cassandra_se.cc
View file @
0362968b
...
...
@@ -594,8 +594,8 @@ bool Cassandra_se_impl::retryable_remove_row()
}
/*
T
his function will try a Cassandra operation, and handle errors.
T
ry calling a function, catching possible Cassandra errors, and re-trying
for "transient" errors.
*/
bool
Cassandra_se_impl
::
try_operation
(
retryable_func_t
func_to_call
)
{
...
...
storage/cassandra/ha_cassandra.cc
View file @
0362968b
...
...
@@ -1676,9 +1676,8 @@ int ha_cassandra::delete_table(const char *name)
bool
ha_cassandra
::
check_if_incompatible_data
(
HA_CREATE_INFO
*
info
,
uint
table_changes
)
{
//ha_table_option_struct *param_old, *param_new;
DBUG_ENTER
(
"ha_cassandra::check_if_incompatible_data"
);
/* Checked, we intend to have this empty for Cassandra SE. */
DBUG_RETURN
(
COMPATIBLE_DATA_YES
);
}
...
...
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