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
12ab6a4f
Commit
12ab6a4f
authored
Aug 31, 2012
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-498: Cassandra: Inserting a timestamp does not work on a 32-bit system
- Make an attempt at fixing.
parent
6cce5204
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
mysql-test/r/cassandra.result
mysql-test/r/cassandra.result
+6
-0
mysql-test/t/cassandra.test
mysql-test/t/cassandra.test
+5
-0
storage/cassandra/ha_cassandra.cc
storage/cassandra/ha_cassandra.cc
+1
-1
No files found.
mysql-test/r/cassandra.result
View file @
12ab6a4f
...
@@ -210,6 +210,12 @@ select * from t2;
...
@@ -210,6 +210,12 @@ select * from t2;
rowkey datecol
rowkey datecol
1 2012-08-29 01:23:45
1 2012-08-29 01:23:45
delete from t2;
delete from t2;
# MDEV-498: Cassandra: Inserting a timestamp does not work on a 32-bit system
INSERT INTO t2 VALUES (10,'2012-12-12 12:12:12');
SELECT * FROM t2;
rowkey datecol
10 2012-12-12 12:12:12
delete from t2;
#
#
# (no MDEV#) Check that insert counters work correctly
# (no MDEV#) Check that insert counters work correctly
#
#
...
...
mysql-test/t/cassandra.test
View file @
12ab6a4f
...
@@ -236,6 +236,11 @@ insert into t2 values (1, '2012-08-29 01:23:45');
...
@@ -236,6 +236,11 @@ insert into t2 values (1, '2012-08-29 01:23:45');
select
*
from
t2
;
select
*
from
t2
;
delete
from
t2
;
delete
from
t2
;
--
echo
# MDEV-498: Cassandra: Inserting a timestamp does not work on a 32-bit system
INSERT
INTO
t2
VALUES
(
10
,
'2012-12-12 12:12:12'
);
SELECT
*
FROM
t2
;
delete
from
t2
;
--
echo
#
--
echo
#
--
echo
# (no MDEV#) Check that insert counters work correctly
--
echo
# (no MDEV#) Check that insert counters work correctly
--
echo
#
--
echo
#
...
...
storage/cassandra/ha_cassandra.cc
View file @
12ab6a4f
...
@@ -599,7 +599,7 @@ class TimestampDataConverter : public ColumnDataConverter
...
@@ -599,7 +599,7 @@ class TimestampDataConverter : public ColumnDataConverter
ts_time
=
((
Field_timestamp
*
)
field
)
->
get_timestamp
(
&
ts_microsec
);
ts_time
=
((
Field_timestamp
*
)
field
)
->
get_timestamp
(
&
ts_microsec
);
/* Cassandra needs milliseconds-since-epoch */
/* Cassandra needs milliseconds-since-epoch */
tmp
=
ts_time
*
1000
+
ts_microsec
/
1000
;
tmp
=
((
int64_t
)
ts_time
)
*
1000
+
ts_microsec
/
1000
;
flip64
((
const
char
*
)
&
tmp
,
(
char
*
)
&
buf
);
flip64
((
const
char
*
)
&
tmp
,
(
char
*
)
&
buf
);
*
cass_data
=
(
char
*
)
&
buf
;
*
cass_data
=
(
char
*
)
&
buf
;
...
...
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