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
52045d40
Commit
52045d40
authored
May 20, 2013
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-4000: Mapping between Cassandra blob (BytesType) and MySQL BLOB does not work
- Allow SQL blobs in the data mapping.
parent
70e909cb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
0 deletions
+29
-0
mysql-test/suite/plugins/r/cassandra.result
mysql-test/suite/plugins/r/cassandra.result
+11
-0
mysql-test/suite/plugins/t/cassandra.test
mysql-test/suite/plugins/t/cassandra.test
+17
-0
storage/cassandra/ha_cassandra.cc
storage/cassandra/ha_cassandra.cc
+1
-0
No files found.
mysql-test/suite/plugins/r/cassandra.result
View file @
52045d40
...
...
@@ -591,3 +591,14 @@ col_int int,
dyncol blob DYNAMIC_COLUMN_STORAGE=yes
) ENGINE=cassandra keyspace='bug' thrift_host = '127.0.0.1' column_family='cf1';
drop table t1;
#
# MDEV-4000: Mapping between Cassandra blob (BytesType) and MySQL BLOB does not work
#
create table t1 (rowkey int primary key, b blob ) ENGINE=CASSANDRA thrift_host = '127.0.0.1' `keyspace`='mariadbtest2' `column_family`='cf13';
insert into t1 values (1, 'fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo-bar');
insert into t1 values (2, 'qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq-baz');
select * from t1;
rowkey b
1 fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo-bar
2 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq-baz
drop table t1;
mysql-test/suite/plugins/t/cassandra.test
View file @
52045d40
...
...
@@ -83,6 +83,8 @@ insert into cf11 (rowkey, decimal_col) values ('val_1234', 1234);
create
columnfamily
cf12
(
rowkey
varchar
primary
key
,
decimal_col
decimal
);
create
columnfamily
cf13
(
rowkey
int
primary
key
,
b
blob
);
EOF
--
error
0
,
1
,
2
--
system
cqlsh
-
3
-
f
$MYSQLTEST_VARDIR
/
cassandra_test_init
.
cql
...
...
@@ -704,6 +706,19 @@ CREATE TABLE t1 (
drop
table
t1
;
--
echo
#
--
echo
# MDEV-4000: Mapping between Cassandra blob (BytesType) and MySQL BLOB does not work
--
echo
#
create
table
t1
(
rowkey
int
primary
key
,
b
blob
)
ENGINE
=
CASSANDRA
thrift_host
=
'127.0.0.1'
`keyspace`
=
'mariadbtest2'
`column_family`
=
'cf13'
;
insert
into
t1
values
(
1
,
'fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo-bar'
);
insert
into
t1
values
(
2
,
'qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq-baz'
);
select
*
from
t1
;
drop
table
t1
;
############################################################################
## Cassandra cleanup
############################################################################
...
...
@@ -715,6 +730,8 @@ drop columnfamily cf4;
drop
columnfamily
cf5
;
drop
columnfamily
cf6
;
drop
columnfamily
cf7
;
drop
columnfamily
cf13
;
--
enable_parsing
############################################################################
## Cassandra cleanup ends
...
...
storage/cassandra/ha_cassandra.cc
View file @
52045d40
...
...
@@ -1373,6 +1373,7 @@ ColumnDataConverter *map_field_to_validator(Field *field, const char *validator_
/* fall through: */
case
MYSQL_TYPE_VAR_STRING
:
case
MYSQL_TYPE_VARCHAR
:
case
MYSQL_TYPE_BLOB
:
{
/*
Cassandra's "varint" type is a binary-encoded arbitary-length
...
...
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