Comments (5)
We use multistatements to execute binlog updates. Multistatement is only usable over the text interface and not the prepared interface.
from ghostferry.
Having a test that fails as soon as you write any kind of non-prepared statement seems a bit overkill to me. Why are non-prepared statements bad in general?
What I was getting at with my comment in #44 (comment) is that this one particular query supposedly has a good reason why it's using a prepared statement (and that reason should be captured by a test). But I imagine the test itself doesn't need to know anything about prepared vs. non-prepared statements (that's an implementation detail, the same bug could probably be solved in some other way), i.e. test the interface, not the implementation.
from ghostferry.
Go's MySQL driver has two protocols: 1. Plain text and 2. Binary. The binary protocol is only used with prepared statements, and allows us to know the actual type of the data being transmitted versus just being []uint8
s everywhere (unless we know the schema ahead of time and can scan into the specific type).
As far as I can tell, in addition to the performance gain, we need to know the type of the data being transmitted. Are there places we shouldn't be using prepared statements? This project may warrant strictly enforcing that given its purpose, although we do query for things like read_only
that obviously don't require type information.
You're right in that we should probably just test in specific places for prepared statements instead of trying to test that any interaction with MySQL is using a prepared statement. I don't think our current interface with MySQL would enable that as we'd have to wrap the driver in our own interface.
from ghostferry.
Is this still a problem?
from ghostferry.
No, I don't think it's worth tracking as an issue right now. If we change the implementation to use non-prepared statements to query data and we cannot correctly handle receiving an []interface{}
then we should have plenty of tests that fail.
from ghostferry.
Related Issues (20)
- tried to advance to a zero log position HOT 1
- mediumint not recognized as numeric type HOT 2
- MariaDB SHOW SLAVE HOSTS output differs from MySQL
- MariaDB binlog events differ from MySQL
- unsigned mediumint value through binlog streamer wrongfully parsed HOT 2
- Cannot follow tutorial due to incompatible docker-compose.yml HOT 1
- Ghostferry misses data for PK values of <= 0 HOT 4
- Investigate removing the cursor and merge it back with the DataIterator
- BinlogStreamerLag in ControlServer's progress API is not seconds as it says it is HOT 1
- Ghostferry control server's webui shows the time taken as now - start
- TestThrottlerThrottlesAndUnthrottles flaky
- Ghostferry should abort if it sees a DDL command that can compromise data integrity
- Ensure BinlogEventBuffer Channel is initialized before running the BinlogStreamer
- Ghostferry binlog streamer lag with large source write volume due to misconfigured BinlogEventBatchSize? HOT 1
- Alternate exit criteria for DataIterators
- InlineVerifyer: invalid memory address or nil pointer dereference
- Trouble with virtual generated columns HOT 6
- Potentially "overlocking" in cursor?
- Config value for copydb `ReplicatedMasterPositionQuery` with vanilla MysQL replication
- Resuming can caused missed replication events HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ghostferry.