is00hcw / tungsten-replicator

Automatically exported from code.google.com/p/tungsten-replicator
0 stars 1 forks source link

Time related columns missing microseconds when replicating to batch applier #962

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Install a replicator with file applier, using a master that is able to store 
microseconds in time columns (MySQL 5.6 or 5.7, MariaDB 10)
2. insert one record
3. check the resulting .csv file

select * from t1;
+---+------+------------+---------------------------+---------------------------
+
| i | msg  | d          | dt                        | ts                        
|
+---+------+------------+---------------------------+---------------------------
+
| 1 | test | 2014-01-15 | 2014-01-15 12:34:56.34568 | 2014-06-30 14:57:50.23578 
|
+---+------+------------+---------------------------+---------------------------
+

What is the expected output?

The time related files are stored with microseconds.

What do you see instead?

Although the THL lists the microseconds, the time related fields in the .csv 
file are missing the fractional part.

SEQ# = 2 / FRAG# = 0 (last frag)
- TIME = 2014-06-30 16:57:50.0
- EPOCH# = 0
- EVENTID = mysql-bin.000002:0000000000000822;-1
- SOURCEID = rr1-qa-continuent-com
- METADATA = [mysql_server_id=101;dbms_type=mysql;service=tsandbox;shard=test]
- TYPE = com.continuent.tungsten.replicator.event.ReplDBMSEvent
- OPTIONS = [foreign_key_checks = 1, unique_checks = 1]
- SQL(0) =
 - ACTION = INSERT
 - SCHEMA = test
 - TABLE = t1
 - ROW# = 0
  - COL(1: i) = 1
  - COL(2: msg) = test
  - COL(3: d) = 2014-01-15
  - COL(4: dt) = 2014-01-15 12:34:56.345680000

  - COL(5: ts) = 2014-06-30 16:57:50.23578

cat 
/home/tungsten/tsb3/db3/releases/tungsten-replicator-3.0.0-89_pid31083/tungsten-
replicator/data/tsandbox/test/t1-2.csv | perl -pe 's/\x1/|/g'
I|2|1|2014-06-30 14:57:50.000|1|test|2014-01-15|2014-01-15 12:34:56|2014-06-30 
14:57:50.235

What is the possible cause?

N/A

What is the proposed solution?

N/A

Original issue reported on code.google.com by g.maxia on 30 Jun 2014 at 3:36

GoogleCodeExporter commented 9 years ago

Original comment by g.maxia on 19 Aug 2014 at 10:54

GoogleCodeExporter commented 9 years ago
All date/time issues are currently scheduled for 3.1.

Original comment by linas.vi...@continuent.com on 10 Sep 2014 at 12:20

GoogleCodeExporter commented 9 years ago

Original comment by linas.vi...@continuent.com on 19 Jan 2015 at 2:18