I am extremely pleased to offer to the community a generic Smalltalk API for database connectivity API, along with a MySQL implementation written from ground up. Think of JDBC and DBI like interfaces in other languages and environments, and this one offers abstract facilities like connection, prepared statement, resultset, row, metdata and so on for the application.
The API implementation uses driver delegates, and insulates the applications from the driver specific interfaces. As of now, a MySQL implementation is available, with other databases engine supports in the future plans. The API supports server side prepared statements and cursor based fetch implemented in the MySQL driver.
The implementation is currently available in 3 parts:
1) StdbCore project: This is primarily the API definitions and the delegation logic URL: http://www.squeaksource.com/StdbCore.html
2) StdbMysqlImpl project: This is the MySQL implementation of the StdbCore API URL: http://www.squeaksource.com/StdbMysqlImpl.html
3) StdbMysqlProtocol project: This is the underlying MySQL protocol driver, and used by the MySQL API implementation URL: http://www.squeaksource.com/StdbMysqlProtocol.html
There is a package load ordering dependency (documented in the MySQL implementation project). Please load the core and the protocol driver packages first, before you load the implementation package.
Combined, the packages has around 200 tests (most of them in the protocol driver and the API implementation) and are running green on Pharo 1.1.1 one click, Squeak 4.2 one click, Squeak 3.10 (with Seaside 2-8-573 dev image) under Mac OS X 10.5.8 with MySQL server 5.0.67.
This was in the making for some time; and I feel it is time to share it with the community. I will continue to post more documentation and code snippets in the project page Wiki sections. For now, looking up the tests may be your best guide.
Happy programming!
Best, Anindya Haldar
thanks
what is the license?
Stef
On Sep 29, 2011, at 10:11 AM, Anindya Haldar wrote:
I am extremely pleased to offer to the community a generic Smalltalk API for database connectivity API, along with a MySQL implementation written from ground up. Think of JDBC and DBI like interfaces in other languages and environments, and this one offers abstract facilities like connection, prepared statement, resultset, row, metdata and so on for the application.
The API implementation uses driver delegates, and insulates the applications from the driver specific interfaces. As of now, a MySQL implementation is available, with other databases engine supports in the future plans.
The API supports server side prepared statements and cursor based fetch implemented in the MySQL driver.
The implementation is currently available in 3 parts:
- StdbCore project: This is primarily the API definitions and the delegation logic
URL: http://www.squeaksource.com/StdbCore.html
- StdbMysqlImpl project: This is the MySQL implementation of the StdbCore API
URL: http://www.squeaksource.com/StdbMysqlImpl.html
- StdbMysqlProtocol project: This is the underlying MySQL protocol driver, and used by the MySQL API implementation
URL: http://www.squeaksource.com/StdbMysqlProtocol.html
There is a package load ordering dependency (documented in the MySQL implementation project). Please load the core and the protocol driver packages first, before you load the implementation package.
Combined, the packages has around 200 tests (most of them in the protocol driver and the API implementation) and are running green on Pharo 1.1.1 one click, Squeak 4.2 one click, Squeak 3.10 (with Seaside 2-8-573 dev image) under Mac OS X 10.5.8 with MySQL server 5.0.67.
This was in the making for some time; and I feel it is time to share it with the community. I will continue to post more documentation and code snippets in the project page Wiki sections. For now, looking up the tests may be your best guide.
Happy programming!
Best, Anindya Haldar
I have now set the projects to MIT license. Thanks for the reminder.
- Anindya
________________________________ From: Stéphane Ducasse stephane.ducasse@inria.fr To: Anindya Haldar anindya_haldar@yahoo.com; A friendly place where any question about pharo is welcome pharo-users@lists.gforge.inria.fr Cc: "squeak-dev@lists.squeakfoundation.org" squeak-dev@lists.squeakfoundation.org Sent: Thursday, September 29, 2011 1:18 AM Subject: Re: [Pharo-users] Now available: a database conectivity API and its MySQL implementation
thanks
what is the license?
Stef
On Sep 29, 2011, at 10:11 AM, Anindya Haldar wrote:
I am extremely pleased to offer to the community a generic Smalltalk API for database connectivity API, along with a MySQL implementation written from ground up. Think of JDBC and DBI like interfaces in other languages and environments, and this one offers abstract facilities like connection, prepared statement, resultset, row, metdata and so on for the application.
The API implementation uses driver delegates, and insulates the applications from the driver specific interfaces. As of now, a MySQL implementation is available, with other databases engine supports in the future plans.
The API supports server side prepared statements and cursor based fetch implemented in the MySQL driver.
The implementation is currently available in 3 parts:
- StdbCore project: This is primarily the API definitions and the delegation logic
URL: http://www.squeaksource.com/StdbCore.html
- StdbMysqlImpl project: This is the MySQL implementation of the StdbCore API
URL: http://www.squeaksource.com/StdbMysqlImpl.html
- StdbMysqlProtocol project: This is the underlying MySQL protocol driver, and used by the MySQL API implementation
URL: http://www.squeaksource.com/StdbMysqlProtocol.html
There is a package load ordering dependency (documented in the MySQL implementation project). Please load the core and the protocol driver packages first, before you load the implementation package.
Combined, the packages has around 200 tests (most of them in the protocol driver and the API implementation) and are running green on Pharo 1.1.1 one click, Squeak 4.2 one click, Squeak 3.10 (with Seaside 2-8-573 dev image) under Mac OS X 10.5.8 with MySQL server 5.0.67.
This was in the making for some time; and I feel it is time to share it with the community. I will continue to post more documentation and code snippets in the project page Wiki sections. For now, looking up the tests may be your best guide.
Happy programming!
Best, Anindya Haldar
Very nice. Quick question: How are you accessing the MySQL db? Are you using a network connection or some FFI facilities? If you are using a network connection, we might have use for your project right away; our current FFI based ODBC implementation causes headaches when the calls take a long time (>1sec).
Cheers, - Andreas
On 9/29/2011 10:11, Anindya Haldar wrote:
I am extremely pleased to offer to the community a generic Smalltalk API for database connectivity API, along with a MySQL implementation written from ground up. Think of JDBC and DBI like interfaces in other languages and environments, and this one offers abstract facilities like connection, prepared statement, resultset, row, metdata and so on for the application.
The API implementation uses driver delegates, and insulates the applications from the driver specific interfaces. As of now, a MySQL implementation is available, with other databases engine supports in the future plans.
The API supports server side prepared sta tements and cursor based fetch implemented in the MySQL driver.
The implementation is currently available in 3 parts:
- StdbCore project: This is primarily the API definitions and the
delegation logic URL: http://www.squeaksource.com/StdbCore.html
- StdbMysqlImpl project: This is the MySQL implementation of the
StdbCore API URL: http://www.squeaksource.com/StdbMysqlImpl.html
- StdbMysqlProtocol project: This is the underlying MySQL protocol
driver, and used by the MySQL API implementation URL: http://www.squeaksource.com/StdbMysqlProtocol.html
There is a package load ordering dependency (documented in the MySQL implementation project). Please load the core and the protocol driver packages first, before you load the implementation package.
Combined, the packages has around 200 tests (most of them in the protocol driver and the API implementation) and are running green on Pharo 1.1.1 one click, Squeak 4.2 one click, Squeak 3.10 (with Seaside 2-8-573 dev image) under Mac OS X 10.5.8 with MySQL server 5.0.67.
This was in the making for some time; and I feel it is time to share it with the community. I will continue to post more documentation and code snippets in the project page Wiki sections. For now, looking up the tests may be your best guide.
Happy programming!
Best, Anindya Haldar
Thanks Andreas. The MySQL protocol is a native all-Smalltalk MySQL driver. There is no FFI or plugin associated with it. The driver implements the MySQL wire protocol on top of socket stream.
Best, Anindya
________________________________ From: Andreas Raab andreas.raab@gmx.de To: Anindya Haldar anindya_haldar@yahoo.com; The general-purpose Squeak developers list squeak-dev@lists.squeakfoundation.org Sent: Thursday, September 29, 2011 1:22 AM Subject: Re: Now available: a database conectivity API and its MySQL implementation
Very nice. Quick question: How are you accessing the MySQL db? Are you using a network connection or some FFI facilities? If you are using a network connection, we might have use for your project right away; our current FFI based ODBC implementation causes headaches when the calls take a long time (>1sec).
Cheers, - Andreas
On 9/29/2011 10:11, Anindya Haldar wrote:
I am extremely pleased to offer to the community a generic Smalltalk API for database connectivity API, along with a MySQL implementation written from ground up. Think of JDBC and DBI like interfaces in other languages and environments, and this one offers abstract facilities like connection, prepared statement, resultset, row, metdata and so on for the application.
The API implementation uses driver delegates, and insulates the applications from the driver specific interfaces. As of now, a MySQL implementation is available, with other databases engine supports in the future plans.
The API supports server side prepared sta tements and cursor based fetch implemented in the MySQL driver.
The implementation is currently available in 3 parts:
- StdbCore project: This is primarily the API definitions and the
delegation logic URL: http://www.squeaksource.com/StdbCore.html
- StdbMysqlImpl project: This is the MySQL implementation of the
StdbCore API URL: http://www.squeaksource.com/StdbMysqlImpl.html
- StdbMysqlProtocol project: This is the underlying MySQL protocol
driver, and used by the MySQL API implementation URL: http://www.squeaksource.com/StdbMysqlProtocol.html
There is a package load ordering dependency (documented in the MySQL implementation project). Please load the core and the protocol driver packages first, before you load the implementation package.
Combined, the packages has around 200 tests (most of them in the protocol driver and the API implementation) and are running green on Pharo 1.1.1 one click, Squeak 4.2 one click, Squeak 3.10 (with Seaside 2-8-573 dev image) under Mac OS X 10.5.8 with MySQL server 5.0.67.
This was in the making for some time; and I feel it is time to share it with the community. I will continue to post more documentation and code snippets in the project page Wiki sections. For now, looking up the tests may be your best guide.
Happy programming!
Best, Anindya Haldar
On 9/29/2011 16:40, Anindya Haldar wrote:
Thanks Andreas. The MySQL protocol is a native all-Smalltalk MySQL driver. There is no FFI or plugin associated with it. The driver implements the MySQL wire protocol on top of socket stream.
Awesome! I'll see if I can get it to work on the weekend. What platforms have you tested it on?
Cheers, - Andreas
*From:* Andreas Raab andreas.raab@gmx.de *To:* Anindya Haldar anindya_haldar@yahoo.com; The general-purpose Squeak developers list squeak-dev@lists.squeakfoundation.org *Sent:* Thursday, September 29, 2011 1:22 AM *Subject:* Re: Now available: a database conectivity API and its MySQL implementation
Very nice. Quick question: How are you accessing the MySQL db? Are you using a network connection or some FFI facilities? If you are using a network connection, we might have use for your project right away; our current FFI based ODBC implementation causes headaches when the calls take a long time (>1sec).
Cheers,
- Andreas
On 9/29/2011 10:11, Anindya Haldar wrote:
I am extremely pleased to offer to the community a generic Smalltalk API for database connectivity API, along with a MySQL implementation written from ground up. Think of JDBC and DBI like interfaces in other languages and environments, and this one offers abstract facilities like connection, prepared statement, resultset, row, metdata and so on for the application.
The API implementation uses driver delegates, and insulates the applications from the driver specific interfaces. As of now, a MySQL implementation is available, with other databases engine supports in the future plans.
The API supports server side prepared sta tements and cursor based fetch implemented in the MySQL driver.
The implementation is currently available in 3 parts:
- StdbCore project: This is primarily the API definitions and the
delegation logic URL: http://www.squeaksource.com/StdbCore.html
- StdbMysqlImpl project: This is the MySQL implementation of the
StdbCore API URL: http://www.squeaksource.com/StdbMysqlImpl.html
- StdbMysqlProtocol project: This is the underlying MySQL protocol
driver, and used by the MySQL API implementation URL: http://www.squeaksource.com/StdbMysqlProtocol.html
There is a package load ordering dependency (documented in the MySQL implementation project). Please load the core and the protocol driver packages first, before you load the implementation package.
Combined, the packages has around 200 tests (most of them in the protocol driver and the API implementation) and are running green on Pharo 1.1.1 one click, Squeak 4.2 one click, Squeak 3.10 (with Seaside 2-8-573 dev image) under Mac OS X 10.5.8 with MySQL server 5.0.67.
This was in the making for some time; and I feel it is time to share it with the community. I will continue to post more documentation and code snippets in the project page Wiki sections. For now, looking up the tests may be your best guide.
Happy programming!
Best, Anindya Haldar
On 9/29/2011 19:28, Andreas Raab wrote:
On 9/29/2011 16:40, Anindya Haldar wrote:
Thanks Andreas. The MySQL protocol is a native all-Smalltalk MySQL driver. There is no FFI or plugin associated with it. The driver implements the MySQL wire protocol on top of socket stream.
Awesome! I'll see if I can get it to work on the weekend. What platforms have you tested it on?
My first tests ends up with an error "This part of the handshake is not implemented" during the connect operation. Is this maybe a MySql version problem? What versions have you successfully tested with?
Cheers, - Andreas
Cheers,
- Andreas
*From:* Andreas Raab andreas.raab@gmx.de *To:* Anindya Haldar anindya_haldar@yahoo.com; The general-purpose Squeak developers list squeak-dev@lists.squeakfoundation.org *Sent:* Thursday, September 29, 2011 1:22 AM *Subject:* Re: Now available: a database conectivity API and its MySQL implementation
Very nice. Quick question: How are you accessing the MySQL db? Are you using a network connection or some FFI facilities? If you are using a network connection, we might have use for your project right away; our current FFI based ODBC implementation causes headaches when the calls take a long time (>1sec).
Cheers,
- Andreas
On 9/29/2011 10:11, Anindya Haldar wrote:
I am extremely pleased to offer to the community a generic Smalltalk
API
for database connectivity API, along with a MySQL implementation
written
from ground up. Think of JDBC and DBI like interfaces in other
languages
and environments, and this one offers abstract facilities like connection, prepared statement, resultset, row, metdata and so on for the application.
The API implementation uses driver delegates, and insulates the applications from the driver specific interfaces. As of now, a MySQL implementation is available, with other databases engine supports in
the
future plans.
The API supports server side prepared sta tements and cursor based
fetch
implemented in the MySQL driver.
The implementation is currently available in 3 parts:
- StdbCore project: This is primarily the API definitions and the
delegation logic URL: http://www.squeaksource.com/StdbCore.html
- StdbMysqlImpl project: This is the MySQL implementation of the
StdbCore API URL: http://www.squeaksource.com/StdbMysqlImpl.html
- StdbMysqlProtocol project: This is the underlying MySQL protocol
driver, and used by the MySQL API implementation URL: http://www.squeaksource.com/StdbMysqlProtocol.html
There is a package load ordering dependency (documented in the MySQL implementation project). Please load the core and the protocol driver packages first, before you load the implementation package.
Combined, the packages has around 200 tests (most of them in the protocol driver and the API implementation) and are running green on Pharo 1.1.1 one click, Squeak 4.2 one click, Squeak 3.10 (with Seaside 2-8-573 dev image) under Mac OS X 10.5.8 with MySQL server 5.0.67.
This was in the making for some time; and I feel it is time to share it with the community. I will continue to post more documentation and code snippets in the project page Wiki sections. For now, looking up the tests may be your best guide.
Happy programming!
Best, Anindya Haldar
I believe this is a version issue. I tested my code with MySQL 5.0.67 on Mac OS X. The details of the test platform combinations are in the project page in Squeaksource.
Could you please let me know your MySQL version and platform? It is entirely possible that for certain versions/conditions the handshake protocol does another extra step. This is something I found NOT applicable for the version I was working with, although the reference C implementation does have such provisions.
I will also keep looking for more details meanwhile.
Best, Anindya
________________________________ From: Andreas Raab andreas.raab@gmx.de To: The general-purpose Squeak developers list squeak-dev@lists.squeakfoundation.org Sent: Thursday, September 29, 2011 11:19 AM Subject: [squeak-dev] Re: Now available: a database conectivity API and its MySQL implementation
On 9/29/2011 19:28, Andreas Raab wrote:
On 9/29/2011 16:40, Anindya Haldar wrote:
Thanks Andreas. The MySQL protocol is a native all-Smalltalk MySQL driver. There is no FFI or plugin associated with it. The driver implements the MySQL wire protocol on top of socket stream.
Awesome! I'll see if I can get it to work on the weekend. What platforms have you tested it on?
My first tests ends up with an error "This part of the handshake is not implemented" during the connect operation. Is this maybe a MySql version problem? What versions have you successfully tested with?
Cheers, - Andreas
Cheers,
- Andreas
*From:* Andreas Raab andreas.raab@gmx.de *To:* Anindya Haldar anindya_haldar@yahoo.com; The general-purpose Squeak developers list squeak-dev@lists.squeakfoundation.org *Sent:* Thursday, September 29, 2011 1:22 AM *Subject:* Re: Now available: a database conectivity API and its MySQL implementation
Very nice. Quick question: How are you accessing the MySQL db? Are you using a network connection or some FFI facilities? If you are using a network connection, we might have use for your project right away; our current FFI based ODBC implementation causes headaches when the calls take a long time (>1sec).
Cheers,
- Andreas
On 9/29/2011 10:11, Anindya Haldar wrote:
I am extremely pleased to offer to the community a generic Smalltalk
API
for database connectivity API, along with a MySQL implementation
written
from ground up. Think of JDBC and DBI like interfaces in other
languages
and environments, and this one offers abstract facilities like connection, prepared statement, resultset, row, metdata and so on for the application.
The API implementation uses driver delegates, and insulates the applications from the driver specific interfaces. As of now, a MySQL implementation is available, with other databases engine supports in
the
future plans.
The API supports server side prepared sta tements and cursor based
fetch
implemented in the MySQL driver.
The implementation is currently available in 3 parts:
- StdbCore project: This is primarily the API definitions and the
delegation logic URL: http://www.squeaksource.com/StdbCore.html
- StdbMysqlImpl project: This is the MySQL implementation of the
StdbCore API URL: http://www.squeaksource.com/StdbMysqlImpl.html
- StdbMysqlProtocol project: This is the underlying MySQL protocol
driver, and used by the MySQL API implementation URL: http://www.squeaksource.com/StdbMysqlProtocol.html
There is a package load ordering dependency (documented in the MySQL implementation project). Please load the core and the protocol driver packages first, before you load the implementation package.
Combined, the packages has around 200 tests (most of them in the protocol driver and the API implementation) and are running green on Pharo 1.1.1 one click, Squeak 4.2 one click, Squeak 3.10 (with Seaside 2-8-573 dev image) under Mac OS X 10.5.8 with MySQL server 5.0.67.
This was in the making for some time; and I feel it is time to share it with the community. I will continue to post more documentation and code snippets in the project page Wiki sections. For now, looking up the tests may be your best guide.
Happy programming!
Best, Anindya Haldar
On 9/30/2011 4:35, Anindya Haldar wrote:
I believe this is a version issue. I tested my code with MySQL 5.0.67 on Mac OS X. The details of the test platform combinations are in the project page in Squeaksource.
Could you please let me know your MySQL version and platform? It is entirely possible that for certain versions/conditions the handshake protocol does another extra step. This is something I found NOT applicable for the version I was working with, although the reference C implementation does have such provisions.
I'm running MySql 5.0.77 server on CentOS 5.6 (which is the out-of-the-box version you get on CentOS via yum). This seems pretty close to what you're using. Is there a chance that I need to set up the database credentials in a specific way? I've just been using an existing user which works fine in other contexts but perhaps there's something specific that needs to be done?
Cheers, - Andreas
I will also keep looking for more details meanwhile.
Best, Anindya
*From:* Andreas Raab andreas.raab@gmx.de *To:* The general-purpose Squeak developers list squeak-dev@lists.squeakfoundation.org *Sent:* Thursday, September 29, 2011 11:19 AM *Subject:* [squeak-dev] Re: Now available: a database conectivity API and its MySQL implementation
On 9/29/2011 19:28, Andreas Raab wrote:
On 9/29/2011 16:40, Anindya Haldar wrote:
Thanks Andreas. The MySQL protocol is a native all-Smalltalk MySQL driver. There is no FFI or plugin associated with it. The driver implements the MySQL wire protocol on top of socket stream.
Awesome! I'll see if I can get it to work on the weekend. What platforms have you tested it on?
My first tests ends up with an error "This part of the handshake is not implemented" during the connect operation. Is this maybe a MySql version problem? What versions have you successfully tested with?
Cheers,
- Andreas
Cheers,
- Andreas
*From:* Andreas Raab <andreas.raab@gmx.de mailto:andreas.raab@gmx.de> *To:* Anindya Haldar <anindya_haldar@yahoo.com
mailto:anindya_haldar@yahoo.com>; The general-purpose
Squeak developers list <squeak-dev@lists.squeakfoundation.org
mailto:squeak-dev@lists.squeakfoundation.org>
*Sent:* Thursday, September 29, 2011 1:22 AM *Subject:* Re: Now available: a database conectivity API and its MySQL implementation
Very nice. Quick question: How are you accessing the MySQL db? Are you using a network connection or some FFI facilities? If you are using a network connection, we might have use for your project right away; our current FFI based ODBC implementation causes headaches when the calls take a long time (>1sec).
Cheers,
- Andreas
On 9/29/2011 10:11, Anindya Haldar wrote:
I am extremely pleased to offer to the community a generic Smalltalk
API
for database connectivity API, along with a MySQL implementation
written
from ground up. Think of JDBC and DBI like interfaces in other
languages
and environments, and this one offers abstract facilities like connection, prepared statement, resultset, row, metdata and so on for the application.
The API implementation uses driver delegates, and insulates the applications from the driver specific interfaces. As of now, a MySQL implementation is available, with other databases engine supports in
the
future plans.
The API supports server side prepared sta tements and cursor based
fetch
implemented in the MySQL driver.
The implementation is currently available in 3 parts:
- StdbCore project: This is primarily the API definitions and the
delegation logic URL: http://www.squeaksource.com/StdbCore.html
- StdbMysqlImpl project: This is the MySQL implementation of the
StdbCore API URL: http://www.squeaksource.com/StdbMysqlImpl.html
- StdbMysqlProtocol project: This is the underlying MySQL protocol
driver, and used by the MySQL API implementation URL: http://www.squeaksource.com/StdbMysqlProtocol.html
There is a package load ordering dependency (documented in the MySQL implementation project). Please load the core and the protocol driver packages first, before you load the implementation package.
Combined, the packages has around 200 tests (most of them in the protocol driver and the API implementation) and are running green on Pharo 1.1.1 one click, Squeak 4.2 one click, Squeak 3.10 (with Seaside 2-8-573 dev image) under Mac OS X 10.5.8 with MySQL server 5.0.67.
This was in the making for some time; and I feel it is time to
share it
with the community. I will continue to post more documentation and
code
snippets in the project page Wiki sections. For now, looking up the tests may be your best guide.
Happy programming!
Best, Anindya Haldar
I have not tried the package in 5.0.77; I will try to get one (unfortunately macports version is 5.0.67 only) installed in my box and try it. I am not sure under what conditions that particular server behavior (the one you are encountering) will trigger. I am looking into it right now, and hopefully can get to answer pretty soon.
Best, Anindya
________________________________ From: Andreas Raab andreas.raab@gmx.de To: The general-purpose Squeak developers list squeak-dev@lists.squeakfoundation.org Sent: Friday, September 30, 2011 12:57 AM Subject: [squeak-dev] Re: Now available: a database conectivity API and its MySQL implementation
On 9/30/2011 4:35, Anindya Haldar wrote:
I believe this is a version issue. I tested my code with MySQL 5.0.67 on Mac OS X. The details of the test platform combinations are in the project page in Squeaksource.
Could you please let me know your MySQL version and platform? It is entirely possible that for certain versions/conditions the handshake protocol does another extra step. This is something I found NOT applicable for the version I was working with, although the reference C implementation does have such provisions.
I'm running MySql 5.0.77 server on CentOS 5.6 (which is the out-of-the-box version you get on CentOS via yum). This seems pretty close to what you're using. Is there a chance that I need to set up the database credentials in a specific way? I've just been using an existing user which works fine in other contexts but perhaps there's something specific that needs to be done?
Cheers, - Andreas
I will also keep looking for more details meanwhile.
Best, Anindya
*From:* Andreas Raab andreas.raab@gmx.de *To:* The general-purpose Squeak developers list squeak-dev@lists.squeakfoundation.org *Sent:* Thursday, September 29, 2011 11:19 AM *Subject:* [squeak-dev] Re: Now available: a database conectivity API and its MySQL implementation
On 9/29/2011 19:28, Andreas Raab wrote: > On 9/29/2011 16:40, Anindya Haldar wrote: >> Thanks Andreas. The MySQL protocol is a native all-Smalltalk MySQL >> driver. There is no FFI or plugin associated with it. The driver >> implements the MySQL wire protocol on top of socket stream. > > Awesome! I'll see if I can get it to work on the weekend. What platforms > have you tested it on?
My first tests ends up with an error "This part of the handshake is not implemented" during the connect operation. Is this maybe a MySql version problem? What versions have you successfully tested with?
Cheers,
- Andreas
> > Cheers, > - Andreas > >> ------------------------------------------------------------------------ >> *From:* Andreas Raab <andreas.raab@gmx.de mailto:andreas.raab@gmx.de> >> *To:* Anindya Haldar <anindya_haldar@yahoo.com mailto:anindya_haldar@yahoo.com>; The general-purpose >> Squeak developers list <squeak-dev@lists.squeakfoundation.org mailto:squeak-dev@lists.squeakfoundation.org> >> *Sent:* Thursday, September 29, 2011 1:22 AM >> *Subject:* Re: Now available: a database conectivity API and its MySQL >> implementation >> >> Very nice. Quick question: How are you accessing the MySQL db? Are you >> using a network connection or some FFI facilities? If you are using a >> network connection, we might have use for your project right away; our >> current FFI based ODBC implementation causes headaches when the calls >> take a long time (>1sec). >> >> Cheers, >> - Andreas >> >> On 9/29/2011 10:11, Anindya Haldar wrote: >> > I am extremely pleased to offer to the community a generic Smalltalk >> API >> > for database connectivity API, along with a MySQL implementation >> written >> > from ground up. Think of JDBC and DBI like interfaces in other >> languages >> > and environments, and this one offers abstract facilities like >> > connection, prepared statement, resultset, row, metdata and so on for >> > the application. >> > >> > The API implementation uses driver delegates, and insulates the >> > applications from the driver specific interfaces. As of now, a MySQL >> > implementation is available, with other databases engine supports in >> the >> > future plans. >> > >> > The API supports server side prepared sta tements and cursor based >> fetch >> > implemented in the MySQL driver. >> > >> > The implementation is currently available in 3 parts: >> > >> > 1) StdbCore project: This is primarily the API definitions and the >> > delegation logic >> > URL: http://www.squeaksource.com/StdbCore.html >> > >> > 2) StdbMysqlImpl project: This is the MySQL implementation of the >> > StdbCore API >> > URL: http://www.squeaksource.com/StdbMysqlImpl.html >> > >> > 3) StdbMysqlProtocol project: This is the underlying MySQL protocol >> > driver, and used by the MySQL API implementation >> > URL: http://www.squeaksource.com/StdbMysqlProtocol.html >> > >> > There is a package load ordering dependency (documented in the MySQL >> > implementation project). Please load the core and the protocol driver >> > packages first, before you load the implementation package. >> > >> > Combined, the packages has around 200 tests (most of them in the >> > protocol driver and the API implementation) and are running green on >> > Pharo 1.1.1 one click, Squeak 4.2 one click, Squeak 3.10 (with Seaside >> > 2-8-573 dev image) under Mac OS X 10.5.8 with MySQL server 5.0.67. >> > >> > This was in the making for some time; and I feel it is time to share it >> > with the community. I will continue to post more documentation and code >> > snippets in the project page Wiki sections. For now, looking up the >> > tests may be your best guide. >> > >> > Happy programming! >> > >> > Best, >> > Anindya Haldar >> > >> > >> > >> > >> > >> >> >> >> >> >> > > >
On 30/09/11 3:57 AM, Andreas Raab wrote:
On 9/30/2011 4:35, Anindya Haldar wrote:
I believe this is a version issue. I tested my code with MySQL 5.0.67 on Mac OS X. The details of the test platform combinations are in the project page in Squeaksource.
Could you please let me know your MySQL version and platform? It is entirely possible that for certain versions/conditions the handshake protocol does another extra step. This is something I found NOT applicable for the version I was working with, although the reference C implementation does have such provisions.
I'm running MySql 5.0.77 server on CentOS 5.6 (which is the out-of-the-box version you get on CentOS via yum). This seems pretty close to what you're using. Is there a chance that I need to set up the database credentials in a specific way? I've just been using an existing user which works fine in other contexts but perhaps there's something specific that needs to be done?
Just a wild guess (based on working on a PostgreSQL driver) - you might try to change the authentication method used by the MySQL server. In PostgreSQL, there is plain text password and OS userid authentication methods, no idea if something similar is available in MySQL. The other authentication methods require hashing or encryption to implement.
I believe I found the core issue here. What likely happens in this scenario is: - The connector follows 4.1.1 and up wire protocol, which has a very specific way of scrambling and hashing of user credentials. And this is supported by the longer hash used by MySQL.
- If the user credential was created with a older version with a shorter hash style, then the server asks the client to send the hash again using older style (short hash). - Our protocol driver does not support this fall back yet, and that is where this exception is thrown - The best solution: have a user with a new style longer password hash. Please refer to the function old_password() vs password() in MySQL documentation. As far as I am aware just setting a new password using the password() function should do it.
- One way to verify the style differences is to do a 'select host, user, password from mysql.user' from an admin account. This lists the password hashes: the older ones are short, the newer ones are long format
- I will investigate further on how to support the old hash style in the driver
Hope this is helpful for now.
BTW, there are some test cases where they use a 'testuser'/'testpass' combination; this is different from the other 'stdbtestuser'/'stdbtestpass' combination. This is an inconsistency that I found, and will fix this so that only the 'stdbtestuser' account is required for running all the unit tests.
Best, Anindya
________________________________ From: Yanni Chiu yanni@rogers.com To: squeak-dev@lists.squeakfoundation.org Sent: Friday, September 30, 2011 9:05 AM Subject: [squeak-dev] Re: Now available: a database conectivity API and its MySQL implementation
On 30/09/11 3:57 AM, Andreas Raab wrote:
On 9/30/2011 4:35, Anindya Haldar wrote:
I believe this is a version issue. I tested my code with MySQL 5.0.67 on Mac OS X. The details of the test platform combinations are in the project page in Squeaksource.
Could you please let me know your MySQL version and platform? It is entirely possible that for certain versions/conditions the handshake protocol does another extra step. This is something I found NOT applicable for the version I was working with, although the reference C implementation does have such provisions.
I'm running MySql 5.0.77 server on CentOS 5.6 (which is the out-of-the-box version you get on CentOS via yum). This seems pretty close to what you're using. Is there a chance that I need to set up the database credentials in a specific way? I've just been using an existing user which works fine in other contexts but perhaps there's something specific that needs to be done?
Just a wild guess (based on working on a PostgreSQL driver) - you might try to change the authentication method used by the MySQL server. In PostgreSQL, there is plain text password and OS userid authentication methods, no idea if something similar is available in MySQL. The other authentication methods require hashing or encryption to implement.
-- Yanni
Perhaps it's best not to support shorter hashes, for the same reason the developers made them longer.
Gary Dunn Open Slate Project http://openslate.org
On Sep 30, 2011 6:39 PM, "Anindya Haldar" anindya_haldar@yahoo.com wrote:
I believe I found the core issue here. What likely happens in this scenario is: - The connector follows 4.1.1 and up wire protocol, which has a very specific way of scrambling and hashing of user credentials. And this is supported by the longer hash used by MySQL. - If the user credential was created with a older version with a shorter hash style, then the server asks the client to send the hash again using older style (short hash). - Our protocol driver does not support this fall back yet, and that is where this exception is thrown - The best solution: have a user with a new style longer password hash. Please refer to the function old_password() vs password() in MySQL documentation. As far as I am aware just setting a new password using the password() function should do it. - One way to verify the style differences is to do a 'select host, user, password from mysql.user' from an admin account. This lists the password hashes: the older ones are short, the newer ones are long format - I will investigate further on how to support the old hash style in the driver
Hope this is helpful for now.
BTW, there are some test cases where they use a 'testuser'/'testpass' combination; this is different from the other 'stdbtestuser'/'stdbtestpass' combination. This is an inconsistency that I found, and will fix this so that only the 'stdbtestuser' account is required for running all the unit tests.
Best, Anindya
------------------------------ *From:* Yanni Chiu yanni@rogers.com *To:* squeak-dev@lists.squeakfoundation.org *Sent:* Friday, September 30, 2011 9:05 AM *Subject:* [squeak-dev] Re: Now available: a database conectivity API and its MySQL implementation
On 30/09/11 3:57 AM, Andreas Raab wrote:
On 9/30/2011 4:35, Anindya Haldar wrote:
I believe this is a version issue. I tested my code with MySQL 5.0.67 on Mac OS X. The details of the test platform combinations are in the project page in Squeaksource.
Could you please let me know your MySQL version and platform? It is entirely possible that for certain versions/conditions the handshake protocol does another extra step. This is something I found NOT applicable for the version I was working with, although the reference C implementation does have such provisions.
I'm running MySql 5.0.77 server on CentOS 5.6 (which is the out-of-the-box version you get on CentOS via yum). This seems pretty close to what you're using. Is there a chance that I need to set up the database credentials in a specific way? I've just been using an existing user which works fine in other contexts but perhaps there's something specific that needs to be done?
Just a wild guess (based on working on a PostgreSQL driver) - you might try to change the authentication method used by the MySQL server. In PostgreSQL, there is plain text password and OS userid authentication methods, no idea if something similar is available in MySQL. The other authentication methods require hashing or encryption to implement.
-- Yanni
squeak-dev@lists.squeakfoundation.org