Add forked Maatkit tools in bin/ and their tests in t/.

This commit is contained in:
Daniel Nichter
2011-06-24 16:02:05 -06:00
parent 6c501128e6
commit b4b6376be1
679 changed files with 177876 additions and 3 deletions

View File

@@ -0,0 +1,18 @@
use bidi;
insert into t values
(1, 'abc', 1, '2010-02-01 05:45:30'),
(2, 'def', 2, '2010-01-31 06:11:11'),
(3, 'ghi', 5, '2010-02-01 09:17:52'), -- 1s newer than remote-1
(4, 'jkl', 6, '2010-02-01 10:11:33'),
(5, 'mno', 3, '2010-02-01 10:17:40'),
(6, 'p', 4, '2010-01-31 10:17:00'),
(7, 'qrs', 5, '2010-02-01 10:11:11'),
(8, 'tuv', 6, '2010-01-31 10:17:20'),
(9, 'wxy', 7, '2010-02-01 10:17:00'),
(10, 'z', 8, '2010-01-31 10:17:08'),
-- (11, '?', 0, '2010-01-29 11:17:12'), -- in remotes
(12, '', 0, '2010-02-01 11:17:00'),
(13, NULL, 0, '2010-02-01 12:17:31'),
(14, NULL, 0, '2010-01-31 10:17:00'),
(15, 'NA', 0, '2010-01-31 07:00:01'),
(20, 'new', 100, '2010-02-01 04:15:36'); -- not in remotes

View File

@@ -0,0 +1,18 @@
use bidi;
insert into t values
(1, 'abc', 1, '2010-02-01 05:45:30'), -- same
(2, 'def', 2, '2010-01-31 06:11:11'),
(3, 'ghi', 5, '2010-02-01 09:17:51'), -- 1s older than master
(4, 'jkl', 6, '2010-02-01 10:11:33'),
(5, NULL, 0, '2010-02-02 05:10:00'), -- updated to NULL
(6, 'p', 4, '2010-01-31 10:17:00'),
(7, 'qrs', 5, '2010-02-01 10:11:11'), -- same
(8, 'tuv', 6, '2010-01-31 10:17:20'),
(9, 'wxy', 7, '2010-02-01 10:17:00'), -- same
(10, 'z', 8, '2010-01-31 10:17:08'),
(11, '?', 0, '2010-01-29 11:17:12'), -- new row
(12, '', 0, '2010-02-01 11:17:00'),
(13, 'hmm', 1, '2010-02-02 12:17:31'), -- newer date, exact time
(14, NULL, 0, '2010-01-31 10:17:00'),
(15, 'gtg', 7, '2010-02-02 06:01:08'), -- updated
(17, 'good', 1, '2010-02-02 21:38:03'); -- new row

View File

@@ -0,0 +1,18 @@
use bidi;
insert into t values
(1, 'abc', 1, '2010-02-01 05:45:30'),
-- error: deleted row
(3, 'ghi', 5, '2010-02-01 09:17:52'),
(4, 'jkl', 6, '2010-02-01 10:11:33'), -- same
(5, 'mno', 3, '2010-02-01 10:17:40'),
(6, 'p', 4, '2010-01-31 10:17:00'), -- same
(7, 'qrs', 5, '2010-02-01 10:11:11'),
(8, 'TUV', 6, '2010-01-31 10:17:20'), -- error: updated val but not ts
(9, 'wxy', 7, '2010-02-01 10:17:00'),
(10, 'rdy', 5, '2010-02-02 09:09:10'), -- updated
(11, '?', 0, '2010-01-29 12:19:48'), -- new/updated
(12, '', 0, '2010-02-01 13:17:19'), -- newer time, exact date
(13, NULL, 0, '2010-02-01 12:17:31'),
(14, NULL, 0, '2010-02-02 13:00:00'), -- updated
(15, 'NA', 0, '2010-01-31 07:00:01'),
(16, NULL, 0, '2010-02-02 13:20:00'); -- new row

View File

@@ -0,0 +1,11 @@
drop database if exists bidi;
create database bidi;
use bidi;
CREATE TABLE `t` (
`id` int(10) unsigned NOT NULL auto_increment,
`c` varchar(255) default NULL,
`d` int(1) unsigned NOT NULL default 0,
`ts` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `ts` (`ts`)
) ENGINE=InnoDB;