Skip to content

Commit

Permalink
pkg -- handle mydumper data source (pingcap#3)
Browse files Browse the repository at this point in the history
* pakage for handle mydumper data source

* modify mydump reader implementation of reading block content

* 1. error check
2. fix problem of block reading
3. modify test cases

* return error on failed creating loader

* mydumper reader's method *Read* accepts 'minBlockSize' rather than 'maxBlockSize' as batch size limitation.

* regulate spelling mistake

* regulate spelling mistake

* update expression of judging valid myduper table file by checking file-name
  • Loading branch information
silentsai authored Feb 9, 2018
1 parent 8962074 commit 75af9bb
Show file tree
Hide file tree
Showing 13 changed files with 21,158 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ingest/mydump/const.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package mydump

const (
defReadBlockSize int64 = 1024 * 8
)
2 changes: 2 additions & 0 deletions ingest/mydump/examples/metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Started dump at: 2017-11-30 20:16:38
Finished dump at: 2017-11-30 20:16:38
1 change: 1 addition & 0 deletions ingest/mydump/examples/mocker_test-schema-create.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE DATABASE `mocker_test` /* !40100 DEFAULT CHARACTER SET utf8 */;
8 changes: 8 additions & 0 deletions ingest/mydump/examples/mocker_test.tbl_autoid-schema.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*!40101 SET NAMES binary*/;
/*!40014 SET FOREIGN_KEY_CHECKS=0*/;

CREATE TABLE `tbl_autoid` (
`ID` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`Name` varchar(64) DEFAULT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
Loading

0 comments on commit 75af9bb

Please sign in to comment.