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
655e3045
Commit
655e3045
authored
Jan 09, 2013
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-4005 fix.
Field matching fixed. DBUG_ASSERT fixed.
parent
ffd5f8c8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
1 deletion
+49
-1
mysql-test/r/cassandra.result
mysql-test/r/cassandra.result
+11
-0
mysql-test/t/cassandra.test
mysql-test/t/cassandra.test
+36
-0
storage/cassandra/ha_cassandra.cc
storage/cassandra/ha_cassandra.cc
+2
-1
No files found.
mysql-test/r/cassandra.result
View file @
655e3045
...
@@ -580,3 +580,14 @@ select rowkey, column_json(dyn) from t1;
...
@@ -580,3 +580,14 @@ select rowkey, column_json(dyn) from t1;
rowkey column_json(dyn)
rowkey column_json(dyn)
delete from t1;
delete from t1;
DROP TABLE t1;
DROP TABLE t1;
#
# MDEV-4005 #Server crashes on creating a Cassandra table
# with a mix of static and dynamic columns
#
DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 (
pk int primary key,
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;
mysql-test/t/cassandra.test
View file @
655e3045
...
@@ -664,6 +664,42 @@ select rowkey, column_json(dyn) from t1;
...
@@ -664,6 +664,42 @@ select rowkey, column_json(dyn) from t1;
delete
from
t1
;
delete
from
t1
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-4005 #Server crashes on creating a Cassandra table
--
echo
# with a mix of static and dynamic columns
--
echo
#
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
,
t2
;
--
enable_warnings
--
remove_files_wildcard
$MYSQLTEST_VARDIR
cassandra_test_cleanup
.
cql
--
write_file
$MYSQLTEST_VARDIR
/
cassandra_test_cleanup
.
cql
drop
keyspace
bug
;
EOF
--
error
0
,
1
,
2
--
system
cqlsh
-
3
-
f
$MYSQLTEST_VARDIR
/
cassandra_test_cleanup
.
cql
--
remove_files_wildcard
$MYSQLTEST_VARDIR
cassandra_test_init
.
cql
--
write_file
$MYSQLTEST_VARDIR
/
cassandra_test_init
.
cql
CREATE
KEYSPACE
bug
WITH
strategy_class
=
'org.apache.cassandra.locator.SimpleStrategy'
AND
strategy_options
:
replication_factor
=
'1'
;
USE
bug
;
create
columnfamily
cf1
(
pk
int
primary
key
,
col_int
int
,
a
bigint
);
EOF
--
system
cqlsh
-
3
-
f
$MYSQLTEST_VARDIR
/
cassandra_test_init
.
cql
CREATE
TABLE
t1
(
pk
int
primary
key
,
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
;
############################################################################
############################################################################
## Cassandra cleanup
## Cassandra cleanup
...
...
storage/cassandra/ha_cassandra.cc
View file @
655e3045
...
@@ -1517,6 +1517,7 @@ bool ha_cassandra::setup_field_converters(Field **field_arg, uint n_fields)
...
@@ -1517,6 +1517,7 @@ bool ha_cassandra::setup_field_converters(Field **field_arg, uint n_fields)
DBUG_RETURN
(
true
);
DBUG_RETURN
(
true
);
}
}
(
*
conv
)
->
field
=
*
field
;
(
*
conv
)
->
field
=
*
field
;
break
;
}
}
}
}
if
(
dyncol_set
&&
!
(
*
field
))
// is needed and not found
if
(
dyncol_set
&&
!
(
*
field
))
// is needed and not found
...
@@ -1611,7 +1612,7 @@ void ha_cassandra::free_field_converters()
...
@@ -1611,7 +1612,7 @@ void ha_cassandra::free_field_converters()
for
(
uint
i
=
0
;
i
<
n_field_converters
;
i
++
)
for
(
uint
i
=
0
;
i
<
n_field_converters
;
i
++
)
if
(
field_converters
[
i
])
if
(
field_converters
[
i
])
{
{
DBUG_ASSERT
(
!
dyncol_set
||
i
=
=
dyncol_field
);
DBUG_ASSERT
(
!
dyncol_set
||
i
!
=
dyncol_field
);
delete
field_converters
[
i
];
delete
field_converters
[
i
];
}
}
my_free
(
field_converters
);
my_free
(
field_converters
);
...
...
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