Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

don't be strict in test for warnings #62

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
arnehormann merged 3 commits into go-sql-driver:master from arnehormann:master
Apr 26, 2013

Conversation

@arnehormann
Copy link
Member

@arnehormann arnehormann commented Apr 24, 2013

No description provided.

Copy link
Member Author

It's the first one that came to mind - I think every single one would be confusing as there's no "RELAXED_DATA_LENGTH" setting afaik. At least we use this one somewhere else...
What does "Yes" mean? Yes add the parameter or Yes make a quickfix (I read it as make and document the quickfix).

Copy link
Member

Yes to the parameter, sorry.

Copy link
Member

What about TRADITIONAL mode?
http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html#sqlmode_traditional

Edit: Ignore this comment. It does the opposite of what you intended.

Copy link
Member Author

Just tested it: for me, the test still fails in traditional mode

Copy link
Member Author

So are we also introducing PTAL after LGTM? Implemented the dsn parameter - but it wasn't necessary to add it to DBTest. I like the way it looks now, no "quickfix" comment required.
... PTAL 😃

Copy link
Member

LGTM, SGTM, PTAL ... everything you want ;-)

I'm still wondering why the invalid dates mode works... The documentation says nothing about other behaviour changes than allowing invalid date ranges.
http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html#sqlmode_allow_invalid_dates

@xaprb ? :)

Copy link
Member

But LGTM for now as a hotfix. We still can swap the sql mode later.

Copy link
Member Author

IMO, the invalid dates mode works because it sets the SQL mode to something not including STRICT_TABLES or STRICT_TRANS_TABLES - which convert overflow warnigns to errors. TRADITIONAL includes STRICT_TRANS_TABLES. ALLOW_INVALID_DATES is the only "relaxed" mode I found which doesn't introduce syntax changes.
I tried to set it to "nothing" after the = - but that didn't work either.

arnehormann added a commit that referenced this pull request Apr 26, 2013
don't be strict in test for warnings
@arnehormann arnehormann merged commit e0f1d77 into go-sql-driver:master Apr 26, 2013
Copy link
Member Author

Btw., my config if someone wants to reproduce it:

I' using MySQL 5.6.10 (on OS X, installed via homebrew).

From my.cnf
sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /