Re: mysql-native v2.1.0

2018-03-08 Thread bauss via Digitalmars-d-announce
On Thursday, 8 March 2018 at 16:24:22 UTC, Steven Schveighoffer wrote: On 3/8/18 11:14 AM, bauss wrote: On Thursday, 8 March 2018 at 15:09:07 UTC, Steven Schveighoffer wrote: The point of a pool is to avoid some costly setup. In my case, I'm not even closing the connection because I feel the "

Re: mysql-native v2.1.0

2018-03-08 Thread Steven Schveighoffer via Digitalmars-d-announce
On 3/8/18 11:14 AM, bauss wrote: On Thursday, 8 March 2018 at 15:09:07 UTC, Steven Schveighoffer wrote: The point of a pool is to avoid some costly setup. In my case, I'm not even closing the connection because I feel the "cost" of allocating a connection from the heap isn't worth worrying abou

Re: mysql-native v2.1.0

2018-03-08 Thread bauss via Digitalmars-d-announce
On Thursday, 8 March 2018 at 15:09:07 UTC, Steven Schveighoffer wrote: The point of a pool is to avoid some costly setup. In my case, I'm not even closing the connection because I feel the "cost" of allocating a connection from the heap isn't worth worrying about. But I also limit the pool so i

Re: mysql-native v2.1.0

2018-03-08 Thread Steven Schveighoffer via Digitalmars-d-announce
On 3/8/18 6:57 AM, bauss wrote: On Thursday, 8 March 2018 at 06:49:52 UTC, Nick Sabalausky (Abscissa) wrote: On 03/07/2018 02:32 PM, bauss wrote: Wait why has it been updated to array() ? So it's not a real range anymore? Or was it always represented as an array behind the scenes? I just fe

Re: mysql-native v2.1.0

2018-03-08 Thread bauss via Digitalmars-d-announce
On Thursday, 8 March 2018 at 13:33:32 UTC, Nick Sabalausky (Abscissa) wrote: Sonke figured out just a few hours ago, and I confirmed, that #170 is caused by a bug in MySQLPool.lockConnection introduced in v2.1.0. I plan to have that fixed with a new release today. That bug turned out to be cau

Re: mysql-native v2.1.0

2018-03-08 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-announce
On 03/08/2018 06:57 AM, bauss wrote: But if you can't store the pools anywhere, how are you supposed to use them with vibe.d? You can store the pools wherever you need to, just don't hold onto a Connection past the end of a vibe task. Creating a new pool for every thread seems expensive an

Re: mysql-native v2.1.0

2018-03-08 Thread bauss via Digitalmars-d-announce
On Thursday, 8 March 2018 at 06:49:52 UTC, Nick Sabalausky (Abscissa) wrote: On 03/07/2018 02:32 PM, bauss wrote: Wait why has it been updated to array() ? So it's not a real range anymore? Or was it always represented as an array behind the scenes? I just feel like allocating it into an ad

Re: mysql-native v2.1.0

2018-03-07 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-announce
On 03/08/2018 02:14 AM, Bauss wrote: By any chance, are you ever storing a Connection or a ResultRange anywhere? I don't mean as a function-local variable or a a function parameter: I mean like as a class/struct member or as a global? (Well, not that D really has true globals, but a "global"

Re: mysql-native v2.1.0

2018-03-07 Thread Bauss via Digitalmars-d-announce
On Thursday, 8 March 2018 at 07:03:15 UTC, Nick Sabalausky (Abscissa) wrote: On 03/07/2018 04:53 PM, bauss wrote: I can't seem to reproduce it now, but I'll keep an eye for it and see if it still happens, but I think the problem is when you return the connection from a function. I had simil

Re: mysql-native v2.1.0

2018-03-07 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-announce
On 03/07/2018 04:53 PM, bauss wrote: I can't seem to reproduce it now, but I'll keep an eye for it and see if it still happens, but I think the problem is when you return the connection from a function. I had similar issues returning a raw connection created. By any chance, are you ever st

Re: mysql-native v2.1.0

2018-03-07 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-announce
On 03/07/2018 02:32 PM, bauss wrote: Wait why has it been updated to array() ? So it's not a real range anymore? Or was it always represented as an array behind the scenes? I just feel like allocating it into an additional array is a waste of memory? But if it was always like that I guess it

Re: mysql-native v2.1.0

2018-03-07 Thread bauss via Digitalmars-d-announce
On Wednesday, 7 March 2018 at 19:36:57 UTC, bauss wrote: On Wednesday, 7 March 2018 at 11:04:10 UTC, Nick Sabalausky (Abscissa) wrote: On 03/06/2018 01:31 PM, bauss wrote: I can't seem to find any examples on how they were updated and what exactly to change in my code. Also, FWIW, mysql-n

Re: mysql-native v2.1.0

2018-03-07 Thread bauss via Digitalmars-d-announce
On Wednesday, 7 March 2018 at 11:04:10 UTC, Nick Sabalausky (Abscissa) wrote: On 03/06/2018 01:31 PM, bauss wrote: I can't seem to find any examples on how they were updated and what exactly to change in my code. Also, FWIW, mysql-native uses semantic versioning (semver), so anything that

Re: mysql-native v2.1.0

2018-03-07 Thread bauss via Digitalmars-d-announce
On Wednesday, 7 March 2018 at 10:14:08 UTC, Nick Sabalausky (Abscissa) wrote: On 03/06/2018 01:54 PM, bauss wrote: On Tuesday, 6 March 2018 at 18:36:45 UTC, bauss wrote: Like more specifically do I still call lockConnection() on a MySQLPool? If you're using vibe.d and MySQLPool, then yes. B

Re: mysql-native v2.1.0

2018-03-07 Thread Steven Schveighoffer via Digitalmars-d-announce
On 3/7/18 5:23 AM, Sönke Ludwig wrote: Am 06.03.2018 um 05:31 schrieb Nick Sabalausky (Abscissa): (...) Also, AFAIK, vibe doesn't offer socket support like it does TCP, so vibe users would loose out on the automatic yield-on-io that's a cornerstone of vibe's concurrency design. There currentl

Re: mysql-native v2.1.0

2018-03-07 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-announce
On 03/06/2018 01:31 PM, bauss wrote: I can't seem to find any examples on how they were updated and what exactly to change in my code. Also, FWIW, mysql-native uses semantic versioning (semver), so anything that worked in v2.0.0 should still continue working in all v2.x.x.

Re: mysql-native v2.1.0

2018-03-07 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-announce
On 03/07/2018 05:23 AM, Sönke Ludwig wrote: Am 06.03.2018 um 05:31 schrieb Nick Sabalausky (Abscissa): (...) Also, AFAIK, vibe doesn't offer socket support like it does TCP, so vibe users would loose out on the automatic yield-on-io that's a cornerstone of vibe's concurrency design. There cur

Re: mysql-native v2.1.0

2018-03-07 Thread Sönke Ludwig via Digitalmars-d-announce
Am 06.03.2018 um 05:31 schrieb Nick Sabalausky (Abscissa): (...) Also, AFAIK, vibe doesn't offer socket support like it does TCP, so vibe users would loose out on the automatic yield-on-io that's a cornerstone of vibe's concurrency design. There currently appears to be something broken, but v

Re: mysql-native v2.1.0

2018-03-07 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-announce
On 03/06/2018 01:54 PM, bauss wrote: On Tuesday, 6 March 2018 at 18:36:45 UTC, bauss wrote: Like more specifically do I still call lockConnection() on a MySQLPool? If you're using vibe.d and MySQLPool, then yes. But that's completely unrelated to prepared statements, it has nothing to do wit

Re: mysql-native v2.1.0

2018-03-07 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-announce
On 03/07/2018 04:16 AM, aberba wrote: On Tuesday, 6 March 2018 at 10:15:30 UTC, Martin Tschierschke wrote: On Tuesday, 6 March 2018 at 07:39:00 UTC, aberba wrote: UNIX sockets provide a way to securely connect in an enclosed/isolated environment without exposing connection externally. This is

Re: mysql-native v2.1.0

2018-03-07 Thread Martin Tschierschke via Digitalmars-d-announce
On Wednesday, 7 March 2018 at 09:16:42 UTC, aberba wrote: On Tuesday, 6 March 2018 at 10:15:30 UTC, Martin Tschierschke wrote: [...] [...] [...] The MySQL instance is running in a managed cloud instance. You don't get to tweak things like with vps. Proxy based connection its what's used.

Re: mysql-native v2.1.0

2018-03-07 Thread aberba via Digitalmars-d-announce
On Tuesday, 6 March 2018 at 10:15:30 UTC, Martin Tschierschke wrote: On Tuesday, 6 March 2018 at 07:39:00 UTC, aberba wrote: On Tuesday, 6 March 2018 at 04:31:42 UTC, Nick Sabalausky (Abscissa) wrote: [...] [...] UNIX sockets provide a way to securely connect in an enclosed/isolated enviro

Re: mysql-native v2.1.0

2018-03-06 Thread bauss via Digitalmars-d-announce
On Tuesday, 6 March 2018 at 18:36:45 UTC, bauss wrote: On Tuesday, 6 March 2018 at 18:31:08 UTC, bauss wrote: On Saturday, 3 March 2018 at 07:37:38 UTC, Nick Sabalausky (Abscissa) wrote: [...] I'm unsure how I'd go about implementing prepared statements in a vibe.d application correctly. [

Re: mysql-native v2.1.0

2018-03-06 Thread bauss via Digitalmars-d-announce
On Tuesday, 6 March 2018 at 18:31:08 UTC, bauss wrote: On Saturday, 3 March 2018 at 07:37:38 UTC, Nick Sabalausky (Abscissa) wrote: [...] I'm unsure how I'd go about implementing prepared statements in a vibe.d application correctly. [...] Like more specifically do I still call lockConnec

Re: mysql-native v2.1.0

2018-03-06 Thread bauss via Digitalmars-d-announce
On Saturday, 3 March 2018 at 07:37:38 UTC, Nick Sabalausky (Abscissa) wrote: An all-D MySQL/MariaDB client library: https://github.com/mysql-d/mysql-native == Tagged 'v2.1.0', which mainly adds a few new features, including greatly simplified shortcut syn

Re: mysql-native v2.1.0

2018-03-06 Thread Martin Tschierschke via Digitalmars-d-announce
On Tuesday, 6 March 2018 at 07:39:00 UTC, aberba wrote: On Tuesday, 6 March 2018 at 04:31:42 UTC, Nick Sabalausky (Abscissa) wrote: [...] I'm not opposed to it being added, but I'm not aware of what benefit it would provide that would big enough to make it a priority. Also, AFAIK, vibe doesn't

Re: mysql-native v2.1.0

2018-03-05 Thread aberba via Digitalmars-d-announce
On Tuesday, 6 March 2018 at 04:31:42 UTC, Nick Sabalausky (Abscissa) wrote: On 03/05/2018 09:23 AM, aberba wrote: On Saturday, 3 March 2018 at 07:37:38 UTC, Nick Sabalausky (Abscissa) wrote: An all-D MySQL/MariaDB client library: https://github.com/mysql-d/mysql-native =

Re: mysql-native v2.1.0

2018-03-05 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-announce
On 03/05/2018 09:23 AM, aberba wrote: On Saturday, 3 March 2018 at 07:37:38 UTC, Nick Sabalausky (Abscissa) wrote: An all-D MySQL/MariaDB client library: https://github.com/mysql-d/mysql-native == [...] Is unix socket connection supported? I'm not seein

Re: mysql-native v2.1.0

2018-03-05 Thread aberba via Digitalmars-d-announce
On Saturday, 3 March 2018 at 07:37:38 UTC, Nick Sabalausky (Abscissa) wrote: An all-D MySQL/MariaDB client library: https://github.com/mysql-d/mysql-native == [...] Is unix socket connection supported? I'm not seeing any information about it in the docs

mysql-native v2.1.0

2018-03-02 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-announce
An all-D MySQL/MariaDB client library: https://github.com/mysql-d/mysql-native == Tagged 'v2.1.0', which mainly adds a few new features, including greatly simplified shortcut syntax for prepared statements (with automatic, implicit caching and re-use):

mysql-native v2.1.0-rc3

2018-02-25 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-announce
Third release candidate, `v2.1.0-rc3`: Snuck in a long-overdue fix for #28: "MYXProtocol thrown when using large integers as prepared parameters." https://github.com/mysql-d/mysql-native/issues/28 --- In other news, there will likely be another release immediately a

Re: mysql-native v2.1.0-rc1: New features

2018-02-25 Thread Steven Schveighoffer via Digitalmars-d-announce
On 2/25/18 2:59 AM, Nick Sabalausky (Abscissa) wrote: On 02/25/2018 02:01 AM, Suliman wrote: What about string interpolation like: conn.exec("INSERT INTO table_name VALUES ({i}, {s})"); ? Instead of: conn.exec("INSERT INTO table_name VALUES (?, ?)", i, s); The syntax is purely, 100% server-s

Re: mysql-native v2.1.0-rc1: New features

2018-02-25 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-announce
On 02/25/2018 02:01 AM, Suliman wrote: What about string interpolation like: conn.exec("INSERT INTO table_name VALUES ({i}, {s})"); ? Instead of: conn.exec("INSERT INTO table_name VALUES (?, ?)", i, s); The syntax is purely, 100% server-side. Mysql-native just passes the whole string, questi

Re: mysql-native v2.1.0-rc1: New features

2018-02-24 Thread Suliman via Digitalmars-d-announce
What about string interpolation like: conn.exec("INSERT INTO table_name VALUES ({i}, {s})"); ? Instead of: conn.exec("INSERT INTO table_name VALUES (?, ?)", i, s);

Re: mysql-native v2.1.0-rc1: New features

2018-02-24 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-announce
Minor second release candidate, 'v2.1.0-rc2'. Only thing this changes is to update the example in the readme to include the new simplified prepared statement interface.

Re: mysql-native v2.1.0-rc1: New features

2018-02-23 Thread aberba via Digitalmars-d-announce
On Friday, 23 February 2018 at 22:15:37 UTC, Nick Sabalausky (Abscissa) wrote: An all-D MySQL/MariaDB client library: https://github.com/mysql-d/mysql-native == [...] That's a very useful feature. Will simplify some code. As well as additional tools for

mysql-native v2.1.0-rc1: New features

2018-02-23 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-announce
An all-D MySQL/MariaDB client library: https://github.com/mysql-d/mysql-native == Tagged 'v2.1.0-rc1', release candidate for v2.1.0, which mainly adds a few new features, inlcuding greatly simplified shortcut syntax for prepared statements (with automatic