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
c69a8fa6
Commit
c69a8fa6
authored
Sep 26, 2012
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Update testcases
- Better error messages.
parent
0362968b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
3 deletions
+30
-3
mysql-test/r/cassandra.result
mysql-test/r/cassandra.result
+12
-0
mysql-test/t/cassandra.test
mysql-test/t/cassandra.test
+4
-2
storage/cassandra/ha_cassandra.cc
storage/cassandra/ha_cassandra.cc
+14
-1
No files found.
mysql-test/r/cassandra.result
View file @
c69a8fa6
...
@@ -369,3 +369,15 @@ rowkey datecol
...
@@ -369,3 +369,15 @@ rowkey datecol
1 1346189025000
1 1346189025000
10 1346189026000
10 1346189026000
drop table t2;
drop table t2;
#
# Check whether changing parameters with ALTER TABLE works.
#
CREATE TABLE t2 (rowkey varchar(32) PRIMARY KEY, decimal_col varbinary(32)) ENGINE=CASSANDRA
thrift_host='localhost' keyspace='mariadbtest2' column_family = 'cf11';
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';
alter table t2 column_family='cf12';
Writes made during ALTER TABLE
0
drop table t2;
mysql-test/t/cassandra.test
View file @
c69a8fa6
...
@@ -472,8 +472,8 @@ drop table t2;
...
@@ -472,8 +472,8 @@ drop table t2;
CREATE
TABLE
t2
(
rowkey
varchar
(
32
)
PRIMARY
KEY
,
decimal_col
varbinary
(
32
))
ENGINE
=
CASSANDRA
CREATE
TABLE
t2
(
rowkey
varchar
(
32
)
PRIMARY
KEY
,
decimal_col
varbinary
(
32
))
ENGINE
=
CASSANDRA
thrift_host
=
'localhost'
keyspace
=
'mariadbtest2'
column_family
=
'cf11'
;
thrift_host
=
'localhost'
keyspace
=
'mariadbtest2'
column_family
=
'cf11'
;
--
error
ER_INTERNAL_ERROR
#
--error ER_INTERNAL_ERROR
alter
table
t2
column_family
=
'cf9'
;
#
alter table t2 column_family='cf9';
drop
table
t2
;
drop
table
t2
;
...
@@ -490,6 +490,8 @@ let $c2= `select variable_value from information_schema.global_status
...
@@ -490,6 +490,8 @@ let $c2= `select variable_value from information_schema.global_status
eval
select
(
$c2
-
$c1
)
as
'Writes made during ALTER TABLE'
;
eval
select
(
$c2
-
$c1
)
as
'Writes made during ALTER TABLE'
;
--
enable_query_log
--
enable_query_log
drop
table
t2
;
############################################################################
############################################################################
## Cassandra cleanup
## Cassandra cleanup
############################################################################
############################################################################
...
...
storage/cassandra/ha_cassandra.cc
View file @
c69a8fa6
...
@@ -992,7 +992,20 @@ bool ha_cassandra::setup_field_converters(Field **field_arg, uint n_fields)
...
@@ -992,7 +992,20 @@ bool ha_cassandra::setup_field_converters(Field **field_arg, uint n_fields)
if
(
n_mapped
!=
n_fields
-
1
)
if
(
n_mapped
!=
n_fields
-
1
)
{
{
se
->
print_error
(
"Some of SQL fields were not mapped to Cassandra's fields"
);
Field
*
first_unmapped
=
NULL
;
/* Find the first field */
for
(
uint
i
=
1
;
i
<
n_fields
;
i
++
)
{
if
(
!
field_converters
[
i
])
{
first_unmapped
=
field_arg
[
i
];
break
;
}
}
DBUG_ASSERT
(
first_unmapped
);
se
->
print_error
(
"Field `%s` could not be mapped to any field in Cassandra"
,
first_unmapped
->
field_name
);
my_error
(
ER_INTERNAL_ERROR
,
MYF
(
0
),
se
->
error_str
());
my_error
(
ER_INTERNAL_ERROR
,
MYF
(
0
),
se
->
error_str
());
return
true
;
return
true
;
}
}
...
...
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