Comments (8)
I think there should definitely be a way added to the database/sql
package to catch warnings. I plan to propose a few patches in the next weeks.
Adding a few debug options to the driver is definitely possible but right now I give priority to implementing the missing features (TLS/SSL, Compression, LONG_DATA
and time.Time
parsing) for the first release candidate.
from mysql.
If you want my opinion, I would say TLS is a very low priority. Not many
people are going to use it in my experience as a consultant. Compression is
slightly more useful but still optional. The last two you mentioned are
more important, I think.
I think it's one of the strengths of this library (as opposed to the others
available) that it is "Go-ish" in its support for the most important and
most common things, in a simple way. Some other libraries are so filled
with features and so confusing that they are scary and hard to use. If I
want absolute compliance and full implementation of every bit of the MySQL
protocol, I will use a wrapper around the official libmysql C library for
sure. So I would encourage you to make this library focused on being
lightweight, simple, some balance of the most useful features, but not
every possible feature. Especially those features that might require
awkward workarounds because of database/sql. If you only implement what
fits well into database/sql, plus maybe a few optional behaviors that are
configurable via flags in the DSN, it will feel "just right" to me.
from mysql.
TLS and compression don't seem to be complex to implement:
- TLS: http://dev.mysql.com/doc/internals/en/ssl.html
- Compression: http://dev.mysql.com/doc/internals/en/compression.html
If they bloat the package to much I`d skip this features for sure.
And you described my initial approach quite well 😉
from mysql.
Yeah, I know they aren't too complex, but TLS in particular is used by maybe 1 user in 1000. At least, that is what I observed while a consultant at Percona. I think I only remember one or two people actually using it. The problem is it is quite costly for the MySQL server and adds a large performance penalty. It is also very flaky to configure. It is much more robust and flexible to use stunnel or something like that for the specific connections where the encryption is actually needed. So, that's my $.02
Thanks for this awesome library :-)
from mysql.
Can't this be achieved by using the "traditional" SQL mode ?
from mysql.
Yes, that is probably a better solution. The show warnings approach feels a
bit clunky.
On Wed, Mar 27, 2013 at 8:25 AM, Julien Schmidt [email protected]:
Can't this be achieved by using the "traditional" SQL modehttp://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html?
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/40#issuecomment-15508510
.
from mysql.
However, traditional mode still only generates warnings for things like:
select unix_timestamp('0');
select 1 + 'foo';
from mysql.
Yes, there are a lot of cases where MySQL will only give a warning. You
also might want MySQL's stricter settings not to be enabled on the whole
server, but only for specific connections, so enabling the variable in the
Go connection would help.
from mysql.
Related Issues (20)
- For some reason the data is not showing. HOT 1
- Cut a new v1.7.2 release HOT 14
- Potential out of bound access in `(*mysqlConn).handleErrorPacket` HOT 7
- Toggle Click in Leaderboards
- mysql startWatcher panic error HOT 3
- Bizarre hanging issue in rows.Close() HOT 7
- Can't Install, bug in edwards25519/scalar.go HOT 1
- Likely race that can prevent to recycle closed connections HOT 5
- Return timeout error instead of Invalid connection err when read packet network timeout HOT 5
- 保存时报错:Prepared statement contains too many placeholders
- too may ram usage when lost connection HOT 13
- SEGV writing packet HOT 1
- Connection liveness/goodeness check and AWS Aurora HOT 1
- Data race between mysqlConn watcher and okHandler during context cancellation HOT 3
- v1.6.0 get error
- Data race between mysqlConn.cleanup() and writeHandshakeResponsePacket HOT 2
- MaxOpenConns is not working
- Receiving "(using password: NO)" when password was given HOT 2
- Why must use port 3306?
- Scanner should return one of int64,float64,bool,[]byte,string,time.Time,nil , but I got uint64 HOT 3
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 mysql.