Comments (14)
Do you have a way to reproduce this just with DO without DataMapper involved? Right now it's not possible to see if the problem is somewhere in DataMapper or on DO.
from do.
Lots of the MySQL tests in this project are failing under MySQL 5.7.
from do.
This may not be exclusive to DO.
Tiagos-Mac-mini:Downloads casanova$ mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.7.9 Homebrew
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> exit
Bye
Tiagos-Mac-mini:Downloads casanova$ irb
2.2.3 :001 > require 'do_mysql'
=> true
2.2.3 :002 > @connection = DataObjects::Connection.new("mysql://127.0.0.1/vendder_test")
=> #<DataObjects::Mysql::Connection:0x007fd97c2a6180 @using_socket=false, @ssl_cipher="DHE-RSA-AES256-SHA", @host="127.0.0.1", @path="/vendder_test", @query=nil, @encoding="UTF-8", @encoding_id=1, @my_encoding="utf8", @connection=#<Object:0x007fd97c2a5cd0>, @uri=#<DataObjects::URI:0x007fd97c2a68d8 @scheme="mysql", @subscheme=nil, @user=nil, @password=nil, @host="127.0.0.1", @port=nil, @path="/vendder_test", @query=nil, @fragment=nil, @relative=true>, @__pool=#<DataObjects::Pooling::Pool<DataObjects::Mysql::Connection> available=0 used=1 size=8>, @__allocated_in_pool=2015-11-16 16:32:43 +0000>
2.2.3 :003 > @reader = @connection.create_command('SELECT * FROM locales').execute_reader
=> #<DataObjects::Mysql::Reader:0x007fd97c2950d8 @connection=#<DataObjects::Mysql::Connection:0x007fd97c2a6180 @using_socket=false, @ssl_cipher="DHE-RSA-AES256-SHA", @host="127.0.0.1", @path="/vendder_test", @query=nil, @encoding="UTF-8", @encoding_id=1, @my_encoding="utf8", @connection=#<Object:0x007fd97c2a5cd0>, @uri=#<DataObjects::URI:0x007fd97c2a68d8 @scheme="mysql", @subscheme=nil, @user=nil, @password=nil, @host="127.0.0.1", @port=nil, @path="/vendder_test", @query=nil, @fragment=nil, @relative=true>, @__pool=#<DataObjects::Pooling::Pool<DataObjects::Mysql::Connection> available=0 used=1 size=8>, @__allocated_in_pool=2015-11-16 16:32:43 +0000>, @reader=#<Object:0x007fd97c2950b0>, @opened=false, @field_count=2, @fields=["tag", "name"], @field_types=[String, String]>
2.2.3 :004 > @reader.next!
=> true
2.2.3 :005 >
However, I do have a project with Padrino & Datamapper and it can't boot due to an error on 'dm-do-adapter', causing a SQL Syntax error just like the OP posted. Perhaps the error comes from that gem.
from do.
Any idea where to look @dbussink?
from do.
@stephankaag Not really without looking myself. You mentioned the do_mysql tests failing on 5.7, but I don't have 5.7 setup yet so I'd have to first do that to see what is going on.
from do.
I just tried running the CI suite against 5.7 and it seems to pass without issues. @stephankaag Do you have the output for the failures you saw running the specs for DO?
from do.
@dbussink Sure. See https://gist.github.com/stephankaag/77dd188b163c2ae4c719
from do.
@stephankaag Do you have additional details of your setup? Like what exact versions are you running? (MySQL, Ruby etc). I haven't been able to reproduce this with 5.7 myself yet so I'm kind of shooting in the dark. Another thing to know is which version do_mysql.dylib
is linked to?
$ find . -name do_mysql.bundle
./lib/do_mysql/do_mysql.bundle
./tmp/x86_64-darwin14.0/do_mysql/2.1.6/do_mysql.bundle
./tmp/x86_64-darwin14.0/stage/lib/do_mysql/do_mysql.bundle
$ otool -L ./lib/do_mysql/do_mysql.bundle
./lib/do_mysql/do_mysql.bundle:
/usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/opt/openssl/lib/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/opt/mysql/lib/libmysqlclient.18.dylib (compatibility version 18.0.0, current version 18.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1225.1.1)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
from do.
MySQL 5.7.9
Ruby 2.2.3
$ find . -name do_mysql.bundle
./lib/do_mysql/do_mysql.bundle
./tmp/x86_64-darwin15/do_mysql/2.2.3/do_mysql.bundle
./tmp/x86_64-darwin15/stage/lib/do_mysql/do_mysql.bundle
$ otool -L ./lib/do_mysql/do_mysql.bundle
./lib/do_mysql/do_mysql.bundle:
/usr/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
/usr/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
/usr/local/opt/mysql/lib/libmysqlclient.20.dylib (compatibility version 20.0.0, current version 20.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1225.1.1)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
from do.
@dbussink Is there anything I can do to help?
from do.
@stephankaag I've been able to reproduce the problem in a test environment, but haven't had time to further dig into the issue.
from do.
Opened #92 which solves this issue. Plan to release a new version after fixing a few more bugs.
from do.
Hero! :-)
from do.
with do_mysql 0.10.17 and mysql 5.7 will error :sql_mode=only_full_group_by
but my DB set not have only_full_group_by mode.
@reader = @connection.create_command('SELECT signature
FROM event
GROUP BY signature
ORDER BY timestamp
DESC LIMIT 5').execute_reader
DataObjects::SQLError: Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'snorby.event.timestamp' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by (code: 1055, sql state: 42000, query: SELECT signature
FROM event
GROUP BY signature
ORDER BY timestamp
DESC LIMIT 5, uri: mysql://[email protected]/snorby)
from (irb):37:in execute_reader' from (irb):37 from /usr/local/rvm/rubies/ruby-2.0.0-p648-install/bin/irb:12:in
from do.
Related Issues (20)
- Usage of .my.cnf file in do_mysql HOT 1
- Fixnum deprecated after ruby 2.4
- postgres - precision lost when casting on double precision HOT 2
- do_postgres won't install with postgresql-9.3 on Ubuntu 13.10 HOT 15
- do_postgres relies on server header files HOT 2
- do_mysql should not automatically coerce tinyint(1) values into bools
- Installing do_postgres fails on OSX maverick and brew install postgresql
- do_postgres does work with rubyinstaller version 2.1 HOT 3
- do_mysql and do_postgres don't run in ruby 2.2 HOT 6
- do_sqlite3:0.10.14 - LoadError: "cannot load such file -- do_sqlite3/2.1/do_sqlite3" HOT 1
- do_postgres appears to be truncating timestamp smaller than seconds HOT 1
- Time is losing timezone from DB and assuming local time zone
- Case sensitive error message test
- do_jdbc not compatible with jruby-9000 HOT 1
- Sqlite3 doesn't handle sub-second time in jruby
- UTF-8-MB4 issues HOT 1
- SQLite DB Connection String ASCII characters
- Configurable pooling
- [do_postgres] Returning ID when bigint fails at `atoi` HOT 5
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 do.