Skip to content

merge master #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 94 commits into from
Mar 11, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
79acd70
Fix crash related to non existent primary key
julien-duponchelle Jul 11, 2014
5146aa2
Fix boolean tests
julien-duponchelle Jul 11, 2014
a5a527d
Looks better now
Jul 13, 2014
783c2bf
Useless import and bad dictionary creation
Jul 13, 2014
7dd49b2
Typos, shadowing of str (built-in), useless imports
Jul 13, 2014
1131f15
Merge pull request #77 from mafagafo/master
julien-duponchelle Jul 14, 2014
fe6ef0f
Fix primary keys tests
julien-duponchelle Jul 14, 2014
6ef4d86
Merge pull request #76 from noplay/fix_unit_tests
julien-duponchelle Jul 15, 2014
dfba9b6
Travis CI
julien-duponchelle Jul 10, 2014
1e8d64b
Complete documentation
julien-duponchelle Jul 15, 2014
4aa4f8b
Fix tests
julien-duponchelle Jul 15, 2014
fe02be1
Merge pull request #73 from noplay/travis
julien-duponchelle Jul 15, 2014
135105a
Complete documentation
julien-duponchelle Jul 15, 2014
b4a8e91
Add nice badges
julien-duponchelle Jul 16, 2014
f4a5b89
Python 2.6 backporting
Jul 29, 2014
5fccd20
Adding 2.6 to .travis.yml and README.md
Jul 30, 2014
34b5d52
reqs += unittest2 for python < 2.7 for Travis
Jul 30, 2014
dd01883
Removes whitespace and triggers travis ci
Jul 31, 2014
a1ad70f
Merge pull request #81 from darioush/python26-support
julien-duponchelle Aug 4, 2014
044085b
Add https://github.com/darioush
julien-duponchelle Aug 4, 2014
3da71a1
Dict comprehension to dict() for py2.6 support
Aug 6, 2014
9de45d5
Merge pull request #83 from darioush/python26
bjoernhaeuser Aug 7, 2014
465605f
Parse gtid events
Aug 29, 2014
b50dea6
Merge pull request #85 from baloo/features/parse-gtid
julien-duponchelle Aug 29, 2014
03d452f
Install gtid on travis
Aug 30, 2014
91c16a6
Date and datetime should have default values
Aug 31, 2014
b722d06
Adds gtid ignore
Aug 31, 2014
7cbbad4
Implement MASTER_AUTO_POSITION
Aug 29, 2014
a805ccd
Tests gtid
Aug 31, 2014
38570f9
Release 0.4
julien-duponchelle Sep 1, 2014
938a016
Missing version bump
julien-duponchelle Sep 1, 2014
b2370e5
Improve Changelog
julien-duponchelle Sep 1, 2014
f3e1c7a
Merge pull request #86 from baloo/features/master_auto_position
julien-duponchelle Sep 1, 2014
434c3a0
Release 0.4.1
julien-duponchelle Sep 1, 2014
0ccd407
kwargs shouldn't be mutable
lxyu Sep 3, 2014
17a0357
for..else flow control
lxyu Sep 3, 2014
d01e4b0
Merge pull request #87 from lxyu/kwargs_fix
julien-duponchelle Sep 3, 2014
79efaf7
remove default server_id as discussed in #80
lxyu Sep 3, 2014
5744a18
fxi tests, add server_id as arg
lxyu Sep 3, 2014
d1df5f1
Merge pull request #88 from lxyu/remove_default_server_id
julien-duponchelle Sep 10, 2014
151f9b6
Benchmark event handling
julien-duponchelle Sep 25, 2014
916de59
Small optimization
julien-duponchelle Sep 25, 2014
9847786
Doc about GTID tests
julien-duponchelle Sep 27, 2014
d2497a1
Add a test for ignoring events
julien-duponchelle Sep 27, 2014
93be38b
Ignore nose test id
julien-duponchelle Sep 27, 2014
3de8598
Improve speed on filtering event
julien-duponchelle Sep 27, 2014
b957dfa
Speedup event filtering
julien-duponchelle Sep 27, 2014
c78ddbe
Python 3 support fix thanks to travis
julien-duponchelle Sep 27, 2014
9d41eb7
Cleanup after @bjoernhaeuser feedback
julien-duponchelle Sep 27, 2014
4766123
Merge pull request #90 from noplay/speedup
julien-duponchelle Sep 27, 2014
b7d63bc
Drop useless test on valid packet
julien-duponchelle Sep 27, 2014
e8dad42
Group the unpack when reading the packet
julien-duponchelle Sep 27, 2014
818f0e0
Speedup row_event processing
julien-duponchelle Sep 27, 2014
06fd091
Merge pull request #93 from noplay/speedup2
julien-duponchelle Sep 28, 2014
ad88669
Filters events by table names
julien-duponchelle Sep 27, 2014
5a8d75f
Filter schemas
julien-duponchelle Sep 27, 2014
6577e07
Merge pull request #92 from noplay/filter_tables
julien-duponchelle Sep 28, 2014
69170b1
Release 0.5
julien-duponchelle Sep 28, 2014
bfe1fa5
Fix description
julien-duponchelle Sep 28, 2014
301707b
Add lire project using python-mysql-replication
julien-duponchelle Sep 28, 2014
671314b
PyPy support
julien-duponchelle Sep 28, 2014
9567fab
Merge pull request #95 from noplay/pypy
julien-duponchelle Sep 29, 2014
4df4274
Filter table and schema event
julien-duponchelle Sep 29, 2014
c6bb281
Avoid named parameters passed to packet because it's slower
julien-duponchelle Sep 29, 2014
5635399
Freeze table schema
julien-duponchelle Sep 29, 2014
26d592d
GetResponse support
julien-duponchelle Oct 4, 2014
6c3ebce
Merge pull request #96 from noplay/filter_table_map_event
julien-duponchelle Oct 11, 2014
860bb23
Freeze schema.
julien-duponchelle Oct 11, 2014
3621149
Merge pull request #97 from noplay/freeze_table_map_event
julien-duponchelle Oct 21, 2014
086cdf0
break reference loop using weakref to prevent memory-leaking
chaoslawful Oct 23, 2014
73ab1f1
explicitly break reference cycle when closing binlogstreamreader
chaoslawful Oct 24, 2014
cd7c283
Update event.py to be compatible with python2.6.7
cccc1999 Nov 24, 2014
d931b5b
Merge pull request #99 from cccc1999/patch-1
julien-duponchelle Nov 26, 2014
0a06b27
Drop vagrant
julien-duponchelle Dec 8, 2014
7ed65f8
Fix travis build
julien-duponchelle Dec 8, 2014
f338813
misc code style improvements, mainly pep8
lxyu Dec 5, 2014
412ae7f
six not being used.
lxyu Dec 5, 2014
c48f7f5
Merge pull request #100 from lxyu/misc_code_improvements
julien-duponchelle Dec 16, 2014
9586be6
add binlog row minimal and noblob image support
siddontang Dec 17, 2014
52567a4
add some explanation for using bitmap
siddontang Dec 17, 2014
9f001d2
try to fix float object is not iterable
siddontang Dec 21, 2014
9af9729
try fix again
siddontang Dec 21, 2014
50fc271
try fix again
siddontang Dec 21, 2014
12e2eca
try fix, I hate python's dynamic type
siddontang Dec 21, 2014
dac47a4
try fix error
siddontang Dec 21, 2014
facd62c
try fix
siddontang Dec 21, 2014
b59ebc7
try fix
siddontang Dec 22, 2014
011eae5
remove confused comment
siddontang Dec 24, 2014
c8cfca8
variable b renamed to cols_bitmap
siddontang Dec 24, 2014
3ede586
use simple bit operations instead
siddontang Dec 24, 2014
c02f99b
add minimal row image test
siddontang Dec 24, 2014
bdfc90f
fix test error
siddontang Dec 24, 2014
6879d41
Merge pull request #103 from siddontang/master
julien-duponchelle Dec 29, 2014
b926ac4
Merge pull request #98 from chaoslawful/master
julien-duponchelle Dec 29, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,25 @@ pip-log.txt
.coverage
.tox

#Translations
# Translations
*.mo

#Mr Developer
.mr.developer.cfg

#Doc
# Doc
_build

#Vagrant
.vagrant

#Text Editor Backupfile
# Text Editor Backupfile
*~

#PyCharm
.idea
# Intellij IDE
.idea
*.xml
*.iml

# Nose
.noseids

# Pyenv
.python-version
96 changes: 96 additions & 0 deletions .mysql/dev.mysql.com.gpg.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1

mQGiBD4+owwRBAC14GIfUfCyEDSIePvEW3SAFUdJBtoQHH/nJKZyQT7h9bPlUWC3
RODjQReyCITRrdwyrKUGku2FmeVGwn2u2WmDMNABLnpprWPkBdCk96+OmSLN9brZ
fw2vOUgCmYv2hW0hyDHuvYlQA/BThQoADgj8AW6/0Lo7V1W9/8VuHP0gQwCgvzV3
BqOxRznNCRCRxAuAuVztHRcEAJooQK1+iSiunZMYD1WufeXfshc57S/+yeJkegNW
hxwR9pRWVArNYJdDR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Qvuuwqp2H139pXGEkg0n6KdUO
etdZWhe70YGNPw1yjWJT1IhUBBgRAgAMBQJOdz3tBQkT+wG4ABIHZUdQRwABAQkQ
jHGNO1By4fUUmwCbBYr2+bBEn/L2BOcnw9Z/QFWuhRMAoKVgCFm5fadQ3Afi+UQl
AcOphrnJ
=443I
-----END PGP PUBLIC KEY BLOCK-----
60 changes: 60 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
language: python
python:
- "2.6"
- "2.7"
- "3.3"
- "3.4"
- "pypy"
install:
- "pip install ."
- "pip install nose"
cache: apt
before_script:
# Remove old mysql version
- "sudo /etc/init.d/mysql stop || true"
- "sudo apt-get remove mysql-common mysql-server-5.5 mysql-server-core-5.5 mysql-client-5.5 mysql-client-core-5.5"
- "sudo apt-get autoremove"
# Config
- "sudo sed -i'' 's/table_cache/table_open_cache/' /etc/mysql/my.cnf"
- "sudo sed -i'' 's/log_slow_queries/slow_query_log/' /etc/mysql/my.cnf"

# Install new mysql version
- "echo deb http://repo.mysql.com/apt/ubuntu/ precise mysql-5.6 | sudo tee /etc/apt/sources.list.d/mysql.list"
- "sudo apt-key add .mysql/dev.mysql.com.gpg.key"
- "sudo apt-get update"
- "sudo env DEBIAN_FRONTEND=noninteractive apt-get install -o Dpkg::Options::='--force-confold' -q -y mysql-server"

# Cleanup old mysql datas
- "sudo rm -rf /var/ramfs/mysql/"
- "sudo mkdir /var/ramfs/mysql/"
- "sudo chown mysql: /var/ramfs/mysql/"

# Config
- "echo '[mysqld]' | sudo tee /etc/mysql/conf.d/replication.cnf"
- "echo 'log-bin=mysql-bin' | sudo tee -a /etc/mysql/conf.d/replication.cnf"
- "echo 'server-id=1' | sudo tee -a /etc/mysql/conf.d/replication.cnf"
- "echo 'binlog-format = row' | sudo tee -a /etc/mysql/conf.d/replication.cnf"

- "sudo /etc/init.d/mysql stop || true"

# Install new datas
- "sudo mysql_install_db --defaults-file=/etc/mysql/my.cnf --basedir=/usr --datadir=/var/ramfs/mysql --verbose"

# Enable GTID
- "echo '[mysqld]' | sudo tee /etc/mysql/conf.d/gtid.cnf"
- "echo 'gtid_mode=ON' | sudo tee -a /etc/mysql/conf.d/gtid.cnf"
- "echo 'enforce_gtid_consistency' | sudo tee -a /etc/mysql/conf.d/gtid.cnf"
- "echo 'binlog_format=ROW' | sudo tee -a /etc/mysql/conf.d/gtid.cnf"
- "echo 'log_slave_updates' | sudo tee -a /etc/mysql/conf.d/gtid.cnf"

# Start mysql (avoid errors to have logs)
- "sudo /etc/init.d/mysql start || true"
- "sudo tail -1000 /var/log/syslog"

- "mysql --version"
- "mysql -e 'SELECT VERSION();'"
- "mysql -u root -e \"GRANT ALL PRIVILEGES ON *.* TO ''@'localhost';\""

- "mysql -e 'CREATE DATABASE pymysqlreplication_test;'"
script:
- "nosetests"
15 changes: 15 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,18 @@
* use NotImplementedEvent instead of raising an Exception
* Python 3 fix
* Add 2006 to Mysql expected error codes

0.4 01/09/2014
* Add primary column informations (thanks to Lx Lu)
* Python 2.6 support (thanks to Darioush Jalalinasab)
* Parse gtid events (thanks to Arthur Gautier)
* Code cleanup (thanks to Bernardo Sulzbach)
* Travis support

0.4.1 01/09/2014
* Fix missing commit for GTID in 0.4 release

0.5 28/09/2014
* Remove default server id
* Performances improvements
* Allow filter events by schema and tables
41 changes: 24 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
python-mysql-replication
========================

<a href="https://travis-ci.org/noplay/python-mysql-replication"><img src="https://travis-ci.org/noplay/python-mysql-replication.svg?branch=master"></a>&nbsp;
<a href="https://pypi.python.org/pypi/mysql-replication"><img src="http://img.shields.io/pypi/dm/mysql-replication.svg"></a>

Pure Python Implementation of MySQL replication protocol build on top of PyMYSQL. This allow you to receive event like insert, update, delete with their datas and raw SQL queries.

Use cases
Expand All @@ -17,6 +20,10 @@ Documentation

A work in progress documentation is available here: https://python-mysql-replication.readthedocs.org/en/latest/

Instruction about building documentation is available here:
https://python-mysql-replication.readthedocs.org/en/latest/developement.html


Installation
=============

Expand All @@ -40,17 +47,16 @@ replication log.

The project is test with:
* MySQL 5.5 and 5.6
* Python 2.7
* Python 3.2
* Python >= 2.6.7
* Python 3.3 and 3.4 (3.2 is not supported)
* PyPy (really faster than the standard Python interpreter)

It's not tested in real production situation.

Limitations
=============

GEOMETRY field is not decoded you will get the raw data.

Only [binlog_row_image=full](http://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html#sysvar_binlog_row_image) is supported (it's the default value).
https://python-mysql-replication.readthedocs.org/en/latest/limitations.html

Projects using this library
===========================
Expand All @@ -59,6 +65,8 @@ Projects using this library
* Ditto: MySQL to MemSQL replicator https://github.com/memsql/ditto
* ElasticMage: Full Magento integration with ElasticSearch https://github.com/ElasticMage/elasticmage
* Cache buster: an automatic cache invalidation system https://github.com/rackerlabs/cache-busters
* Zabbix collector for OpenTSDB https://github.com/OpenTSDB/tcollector/blob/master/collectors/0/zabbix_bridge.py
* Meepo: Event sourcing and event broadcasting for datebases. https://github.com/eleme/meepo

MySQL server settings
=========================
Expand Down Expand Up @@ -244,19 +252,14 @@ Output will be:

Tests
========
<b>Be carefull</b> tests will reset the binary log of your MySQL server.
When it's possible we have an unit test.

Make sure you have the following configuration set in your mysql config file (usually my.cnf on development env):
More information is available here:
https://python-mysql-replication.readthedocs.org/en/latest/developement.html

log-bin=mysql-bin
server-id=1
binlog_do_db=pymysqlreplication_test
binlog-format = row #Very important if you want to receive write, update and delete row events


To run tests:

python setup.py test
Changelog
==========
https://python-mysql-replication.readthedocs.org/en/latest/changelog.html

Similar projects
==================
Expand Down Expand Up @@ -285,10 +288,14 @@ Other contributors:
* Maralla Python 3.4 fix https://github.com/maralla
* Daniel Gavrila more MySQL error codes https://github.com/danielduduta
* Bernardo Sulzbach code cleanup https://github.com/mafagafo
* Darioush Jalali Python 2.6 backport https://github.com/darioush
* Arthur Gautier gtid https://github.com/baloo

Thanks to GetResponse for their support

Licence
=======
Copyright 2012 Julien Duponchelle
Copyright 2012-2014 Julien Duponchelle

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
42 changes: 0 additions & 42 deletions Vagrantfile

This file was deleted.

4 changes: 2 additions & 2 deletions docs/binlogstream.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
###################
##################
BinLogStreamReader
###################
##################


.. automodule:: pymysqlreplication.binlogstream
Expand Down
26 changes: 26 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
##########
Changelog
##########

0.3 07/07/2014
===============
* use NotImplementedEvent instead of raising an Exception
* Python 3 fix
* Add 2006 to Mysql expected error codes

0.2 13/10/2013
===============
* pymysql 0.6 support
* fix smallint24
* fix new decimal support
* TINYINT(1) to bool mapping
* change names of events to V2 from default
* Fix broken "dates" - zero years..
* add support for NULL_EVENT, INTVAR_EVENT and GTID_LOG_EVENT
* Skip invalid packets
* Display log pos inside events dump
* Handle utf8 name for queries

0.1 01/05/2013
===============
First public version
Loading