Coder Social home page Coder Social logo

Does not work with MySQL 5.7 about do HOT 14 CLOSED

stephankaag avatar stephankaag commented on August 19, 2024
Does not work with MySQL 5.7

from do.

Comments (14)

dbussink avatar dbussink commented on August 19, 2024

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.

stephankaag avatar stephankaag commented on August 19, 2024

Lots of the MySQL tests in this project are failing under MySQL 5.7.

from do.

tiagocasanovapt avatar tiagocasanovapt commented on August 19, 2024

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.

stephankaag avatar stephankaag commented on August 19, 2024

Any idea where to look @dbussink?

from do.

dbussink avatar dbussink commented on August 19, 2024

@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.

dbussink avatar dbussink commented on August 19, 2024

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.

stephankaag avatar stephankaag commented on August 19, 2024

@dbussink Sure. See https://gist.github.com/stephankaag/77dd188b163c2ae4c719

from do.

dbussink avatar dbussink commented on August 19, 2024

@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.

stephankaag avatar stephankaag commented on August 19, 2024

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.

stephankaag avatar stephankaag commented on August 19, 2024

@dbussink Is there anything I can do to help?

from do.

dbussink avatar dbussink commented on August 19, 2024

@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.

dbussink avatar dbussink commented on August 19, 2024

Opened #92 which solves this issue. Plan to release a new version after fixing a few more bugs.

from do.

stephankaag avatar stephankaag commented on August 19, 2024

Hero! :-)

from do.

XCM-jj avatar XCM-jj commented on August 19, 2024

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)

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.