Since "engine" used to work as far back as I can tell I just changed "type"
to "engine" instead of the fancy solution I delineated earlier.

BTW: Either something's wrong with the cmake scripts or I don't know how to
use it.  I have mysql installed in a somewhat weird place.  I tried the
following:

cmake -G "Unix Makefiles" -DWITH_BOOST=OFF
-DMYSQL_INCLUDE_DIR=/opt/local/include/mysql55/mysql/
-DMYSQL_LIBRARIES=/opt/local/lib/mysql55/mysql/libmysqlclient_r.dylib
../soci/src/

and it didn't work: MYSQL_INCLUDE_DIR was found correctly but
MYSQL_LIBRARIES was listed as not found:

-- MySQL:
-- WARNING:
-- MySQL not found, some libraries or features will be disabled.
-- See the documentation for MySQL or manually set these variables:
-- MYSQL_INCLUDE_DIR                        =
/opt/local/include/mysql55/mysql
-- MYSQL_LIBRARIES                          = MYSQL_LIBRARY-NOTFOUND


so I changed the file src/cmake/modules/FindMySQL.cmake by adding a line
like this:

--- a/src/cmake/modules/FindMySQL.cmake
+++ b/src/cmake/modules/FindMySQL.cmake
@@ -45,6 +45,7 @@ else()
     $ENV{MYSQL_DIR}/libmysql_r/.libs
     $ENV{MYSQL_DIR}/lib
     $ENV{MYSQL_DIR}/lib/mysql
+    /opt/local/lib/mysql55/mysql
     /usr/lib/mysql
     /usr/local/lib/mysql
     /usr/local/mysql/lib


after that, running

cmake -G "Unix Makefiles" -DWITH_BOOST=OFF
-DMYSQL_INCLUDE_DIR=/opt/local/include/mysql55/mysql/ ../soci/src/

was successful:

-- MySQL:
-- MYSQL_INCLUDE_DIR                        =
/opt/local/include/mysql55/mysql
-- MYSQL_LIBRARIES                          =
/opt/local/lib/mysql55/mysql/libmysqlclient_r.dylib


but note that the file it discovered is exactly the one I passed earlier,
before changing FindMySQL.cmake, from the command line!  And then it didn't
see it? What's going on?

Thanks,

Aleksander

On Fri, Oct 26, 2012 at 5:06 PM, Mateusz Loskot <[email protected]> wrote:

> On 28 September 2012 19:10, Pawel Aleksander Fedorynski
> <[email protected]> wrote:
> > On Fri, Sep 28, 2012 at 1:37 PM, Sergei Nikulov <
> [email protected]> wrote:
> >>
> >> Changes for mysql tests https://github.com/SOCI/soci/pull/9(Aleksander, 
> >> FYI)
> >
> > I took a quick look and it seems you just dropped the "type InnoDB" part
> > from the request in table_creator_one?  Won't that break the transactions
> > test?
> >
> > What I think we need to do is this: 1. Determine the server version at
> the
> > beginning, e.g., in test_context's constructor, save the information and
> > pass it as a parameter to table_creator_one's constructor.  2. In
> > table_creator_one's constructor, use one or the other syntax depending on
> > the server version.
>
> Folks,
>
> Just to bump this one up.
> I've got MySQL back on my machine and I noticed that currently the tests
> are failing against MySQL 5.5:
>
> $ ./soci_mysql_test_static "db=soci_test user=mloskot"
> You have an error in your SQL syntax; check the manual that
> corresponds to your MySQL server version for the right syntax to use
> near 'type=InnoDB' at line 1
>
> $ mysql --version
> mysql  Ver 14.14 Distrib 5.5.28, for Linux (x86_64) using readline 5.1
>
> It looks, we may have to figure out how to distinguish and support
> incompatible versions of DBMSs at run-time.
> I presume, similar situation may happen with PostgreSQL 9.2 or later.
>
> Are we heading down to a enum/bitmask to juggle feature variants per DBMS?
> :)
>
> Best regards,
> --
> Mateusz Loskot, http://mateusz.loskot.net
>
>
> ------------------------------------------------------------------------------
> WINDOWS 8 is here.
> Millions of people.  Your app in 30 days.
> Visit The Windows 8 Center at Sourceforge for all your go to resources.
> http://windows8center.sourceforge.net/
> join-generation-app-and-make-money-coding-fast/
> _______________________________________________
> Soci-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/soci-users
>
------------------------------------------------------------------------------
WINDOWS 8 is here. 
Millions of people.  Your app in 30 days.
Visit The Windows 8 Center at Sourceforge for all your go to resources.
http://windows8center.sourceforge.net/
join-generation-app-and-make-money-coding-fast/
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to