Skip to content

Commit df99b9f

Browse files
committed
fix and improve step-by-step instructions: test, example, result
1 parent 3178101 commit df99b9f

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

README.md

+13-3
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,30 @@ stop the elasticsearch container and modify /usr/share/elasticsearch/config/elas
3636
restart the elasticsearch container, and in the pymyelarepl container,
3737

3838
```
39-
(for test) cd pymyelarepl && python test/test.py
39+
(for test) cd pymyelarepl && python test/test_basic.py
4040
41-
(after executing some sql in the mysql container, for example) cd pymyelarepl && python example/run.py
41+
42+
(after executing the following sql in the mysql container as root without password, for example) cd pymyelarepl && python example/run.py
43+
44+
CREATE DATABASE test;
45+
use test;
46+
CREATE TABLE test4 (id int NOT NULL AUTO_INCREMENT, data VARCHAR(255), data2 VARCHAR(255), PRIMARY KEY(id));
47+
INSERT INTO test4 (data, data2) VALUES ("Hello", "World");
48+
UPDATE test4 SET data="World", data2="Hello" WHERE id=1;
49+
DELETE FROM test4 WHERE id=1;
4250
```
4351

4452

4553
<br>
4654

47-
the results of the two cases are like the below, which means data is replicated successfully:
55+
the results of the two cases are similar to the below, which means data is replicated successfully:
4856

4957
```
5058
{'errors': False, 'took': 12, 'items': [{'create': {'_index': 'basic_replication', '_id': '1', '_version': 1, 'result': 'created', '_shards': {'total': 2, 'successful': 1, 'failed': 0}, '_seq_no': 6, '_primary_term': 1, 'status': 201}}, {'create': {'_index': 'basic_replication', '_id': '2', '_version': 1, 'result': 'created', '_shards': {'total': 2, 'successful': 1, 'failed': 0}, '_seq_no': 7, '_primary_term': 1, 'status': 201}}]}
5159
{'errors': False, 'took': 11, 'items': [{'update': {'_index': 'basic_replication', '_id': '1', '_version': 2, 'result': 'updated', '_shards': {'total': 2, 'successful': 1, 'failed': 0}, '_seq_no': 8, '_primary_term': 1, 'status': 200}}, {'update': {'_index': 'basic_replication', '_id': '2', '_version': 2, 'result': 'updated', '_shards': {'total': 2, 'successful': 1, 'failed': 0}, '_seq_no': 9, '_primary_term': 1, 'status': 200}}]}
5260
{'errors': False, 'took': 2, 'items': [{'delete': {'_index': 'basic_replication', '_id': '1', '_version': 3, 'result': 'deleted', '_shards': {'total': 2, 'successful': 1, 'failed': 0}, '_seq_no': 10, '_primary_term': 1, 'status': 200}}, {'delete': {'_index': 'basic_replication', '_id': '2', '_version': 3, 'result': 'deleted', '_shards': {'total': 2, 'successful': 1, 'failed': 0}, '_seq_no': 11, '_primary_term': 1, 'status': 200}}]}
61+
62+
(blocked for the example)
5363
```
5464

5565

0 commit comments

Comments
 (0)