Coder Social home page Coder Social logo

Comments (8)

julienschmidt avatar julienschmidt commented on May 12, 2024

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.

xaprb avatar xaprb commented on May 12, 2024

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.

julienschmidt avatar julienschmidt commented on May 12, 2024

TLS and compression don't seem to be complex to implement:

If they bloat the package to much I`d skip this features for sure.
And you described my initial approach quite well 😉

from mysql.

xaprb avatar xaprb commented on May 12, 2024

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.

julienschmidt avatar julienschmidt commented on May 12, 2024

Can't this be achieved by using the "traditional" SQL mode ?

from mysql.

serbaut avatar serbaut commented on May 12, 2024

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.

serbaut avatar serbaut commented on May 12, 2024

However, traditional mode still only generates warnings for things like:

select unix_timestamp('0');
select 1 + 'foo';

from mysql.

xaprb avatar xaprb commented on May 12, 2024

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)

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.