Coder Social home page Coder Social logo

实际测试时,无法按照db和table进行过滤,加上-B选项则可以。有遇到类似情况的吗? about binlog2sql HOT 5 CLOSED

danfengcao avatar danfengcao commented on August 27, 2024
实际测试时,无法按照db和table进行过滤,加上-B选项则可以。有遇到类似情况的吗?

from binlog2sql.

Comments (5)

danfengcao avatar danfengcao commented on August 27, 2024

你好,能贴下输出结果吗?
如果是DDL语句,正向解析不会过滤,flashback模式会忽略DDL

from binlog2sql.

long904 avatar long904 commented on August 27, 2024

请问「正向解析」怎么理解?我也遇到这个问题,-d -t 过滤不了。python 版本为2.6.6,执行以下
python binlog2sql/binlog2sql/binlog2sql.py -dtest -t1129 -h127.0.0.1 -P3306 -uback -p'xxxx' --start-file='mysql-bin.000396'
不是我想过滤的目标库和表,解析结果是把'mysql-bin.000396'里面的内容全部解析出来了。

from binlog2sql.

long904 avatar long904 commented on August 27, 2024

刚做了个测试。通过 source xxx.sql ,-B 过滤解析出来的怎么全是 delete 语句,不应该是 insert 吗?

from binlog2sql.

danfengcao avatar danfengcao commented on August 27, 2024

为避免之前db过滤包含ddl的困惑,我做了些改动。新加一个控制参数,--only-dml 用于控制解析SQL类型,默认只解析dml,现在db过滤不会再有ddl干扰。详见 #23 或最新文档

from binlog2sql.

danfengcao avatar danfengcao commented on August 27, 2024

@long904 导入数据后,直接解析出来是insert语句,-B是闪回模式,生成的是回滚语句,所以生成delete是对的

from binlog2sql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.