Skip to content

Commit 75af9bb

Browse files
authored
pkg -- handle mydumper data source (pingcap#3)
* 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
1 parent 8962074 commit 75af9bb

13 files changed

+21158
-0
lines changed

ingest/mydump/const.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package mydump
2+
3+
const (
4+
defReadBlockSize int64 = 1024 * 8
5+
)

ingest/mydump/examples/metadata

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Started dump at: 2017-11-30 20:16:38
2+
Finished dump at: 2017-11-30 20:16:38
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CREATE DATABASE `mocker_test` /* !40100 DEFAULT CHARACTER SET utf8 */;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*!40101 SET NAMES binary*/;
2+
/*!40014 SET FOREIGN_KEY_CHECKS=0*/;
3+
4+
CREATE TABLE `tbl_autoid` (
5+
`ID` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
6+
`Name` varchar(64) DEFAULT NULL,
7+
PRIMARY KEY (`ID`)
8+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

0 commit comments

Comments
 (0)