October 17, 2011 Re: [std.database] | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steve Teale | On Monday, October 17, 2011 09:38 Steve Teale wrote:
> > PostgreSQL's protocol is stable since 2003, but MySQL's is not very friendly indeed. Phobos might follow opportunistic path and support direct access with recent MySQL versions and C wrapper for older ones.
>
> But it looks like the C wrapper approach for MySQL won't fly for Phobos because of the GPL taint. MySQL support might have to be consigned to the Deimos 'derived works' directory. Either that or Phobos only supports versions > 5.xx.
However, if we go with an appropriately pluggable approach with the DB engines, then it should be perfectly possible to have a 3rd party library which provides a DB engine for mysql which you can then use with Phobos if your program is GPL or GPL-compatible. So, no it won't be in Phobos if we have to use the C headers, but that doesn't necssarily mean that it couldn't be used with Phobos' DB solution.
- Jonathan M Davis
|
October 17, 2011 Re: [std.database] | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marco Leise | On 17.10.2011 19:46, Marco Leise wrote:
> Am 17.10.2011, 18:38 Uhr, schrieb Steve Teale
> <steve.teale@britseyeview.com>:
>
>>> PostgreSQL's protocol is stable since 2003, but MySQL's is not very
>>> friendly indeed. Phobos might follow opportunistic path and support
>>> direct access with recent MySQL versions and C wrapper for older ones.
>>
>> But it looks like the C wrapper approach for MySQL won't fly for Phobos
>> because of the GPL taint. MySQL support might have to be consigned to the
>> Deimos 'derived works' directory. Either that or Phobos only supports
>> versions > 5.xx.
>>
>> Steve
>
> Do people not upgrade their database to MySQL 5? I never had to deal
> with that and especially large complicated databases. If it is easy to
> upgrade to MySQL 5 and it is faster and more secure there are probably
> few *actively developed* projects accessing MySQL 4 DBs. (MySQL 5 is
> pretty much exactly 6 years old now.)
You'll always find people not upgrading technology for various reasons. We continue to use MySQL 4 at work for an internal legacy application because it just works and we _know_ upgrading will be a lot of work.
And see how IE6 is still in use.
I'm not advocating that D should strive to support legacy technologies though. I don't think Win98 or earlier are supported either.
|
October 17, 2011 Re: [std.database] | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | On 2011-10-17 19:55, Jonathan M Davis wrote: > On Monday, October 17, 2011 09:38 Steve Teale wrote: >>> PostgreSQL's protocol is stable since 2003, but MySQL's is not very >>> friendly indeed. Phobos might follow opportunistic path and support >>> direct access with recent MySQL versions and C wrapper for older ones. >> >> But it looks like the C wrapper approach for MySQL won't fly for Phobos >> because of the GPL taint. MySQL support might have to be consigned to the >> Deimos 'derived works' directory. Either that or Phobos only supports >> versions> 5.xx. > > However, if we go with an appropriately pluggable approach with the DB > engines, then it should be perfectly possible to have a 3rd party library > which provides a DB engine for mysql which you can then use with Phobos if > your program is GPL or GPL-compatible. So, no it won't be in Phobos if we have > to use the C headers, but that doesn't necssarily mean that it couldn't be > used with Phobos' DB solution. > > - Jonathan M Davis I think that the Phobos database API needs to support database drivers written by third part users, that can be easily plugged in, for exactly the above mentioned reason. -- /Jacob Carlborg |
October 17, 2011 Re: [std.database] | ||||
---|---|---|---|---|
| ||||
Posted in reply to simendsjo | On 2011-10-17 20:07, simendsjo wrote: > On 17.10.2011 19:46, Marco Leise wrote: >> Am 17.10.2011, 18:38 Uhr, schrieb Steve Teale >> <steve.teale@britseyeview.com>: >> >>>> PostgreSQL's protocol is stable since 2003, but MySQL's is not very >>>> friendly indeed. Phobos might follow opportunistic path and support >>>> direct access with recent MySQL versions and C wrapper for older ones. >>> >>> But it looks like the C wrapper approach for MySQL won't fly for Phobos >>> because of the GPL taint. MySQL support might have to be consigned to >>> the >>> Deimos 'derived works' directory. Either that or Phobos only supports >>> versions > 5.xx. >>> >>> Steve >> >> Do people not upgrade their database to MySQL 5? I never had to deal >> with that and especially large complicated databases. If it is easy to >> upgrade to MySQL 5 and it is faster and more secure there are probably >> few *actively developed* projects accessing MySQL 4 DBs. (MySQL 5 is >> pretty much exactly 6 years old now.) > > You'll always find people not upgrading technology for various reasons. > We continue to use MySQL 4 at work for an internal legacy application > because it just works and we _know_ upgrading will be a lot of work. > And see how IE6 is still in use. > > I'm not advocating that D should strive to support legacy technologies > though. I don't think Win98 or earlier are supported either. We can start with supporting the latest version and if there is a demand for earlier versions those can be provided by third party or similar if they can't be included in Phobos. -- /Jacob Carlborg |
October 17, 2011 Re: [std.database] | ||||
---|---|---|---|---|
| ||||
Posted in reply to simendsjo | On Monday, October 17, 2011 11:07 simendsjo wrote:
> On 17.10.2011 19:46, Marco Leise wrote:
> > Am 17.10.2011, 18:38 Uhr, schrieb Steve Teale
> >
> > <steve.teale@britseyeview.com>:
> >>> PostgreSQL's protocol is stable since 2003, but MySQL's is not very friendly indeed. Phobos might follow opportunistic path and support direct access with recent MySQL versions and C wrapper for older ones.
> >>
> >> But it looks like the C wrapper approach for MySQL won't fly for Phobos because of the GPL taint. MySQL support might have to be consigned to the Deimos 'derived works' directory. Either that or Phobos only supports versions > 5.xx.
> >>
> >> Steve
> >
> > Do people not upgrade their database to MySQL 5? I never had to deal with that and especially large complicated databases. If it is easy to upgrade to MySQL 5 and it is faster and more secure there are probably few *actively developed* projects accessing MySQL 4 DBs. (MySQL 5 is pretty much exactly 6 years old now.)
>
> You'll always find people not upgrading technology for various reasons. We continue to use MySQL 4 at work for an internal legacy application because it just works and we _know_ upgrading will be a lot of work. And see how IE6 is still in use.
>
> I'm not advocating that D should strive to support legacy technologies though. I don't think Win98 or earlier are supported either.
There is code in druntime and Phobos which special-cases for Windows 98 and earlier (e.g. std.file using the A functions instead of the W functions if the version of Windows that you're running on is too old to have the W functions). Now, personally, I would love it if we just said that you have to have at least Win2k if not WinXP. It would be _great_ to be able to assume at least Vista, since it added a number of useful functions, but XP is still too prevalent for that to be reasonable. Regardless, supporting older versions of Windows is just plain irritating, since it restricts what you can do, and D is new enough and Win2k old enough that I find it perfectly reasonable to insist that you have WinXP or newer, but that's not what we're doing at this point.
- Jonathan M Davis
|
October 17, 2011 Re: [std.database] | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steve Teale | On Fri, 14 Oct 2011 14:23:32 +0000, Steve Teale wrote:
> OK, for what it's worth, the compiler generated documentation (well, more or less) for my mysqlD effort is now on my web site.
>
> http://britseyeview.com/software/mysqld/
Updated this so it now also has database and table listings, column metadata, and details of stored functions and procedures.
Added Command methods specialized on stored functions and procedures.
Only one comment so far, so it's either absolute crap or perfect.
Steve
|
October 17, 2011 Re: [std.database] | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | On 17.10.2011 20:24, Jonathan M Davis wrote:
> There is code in druntime and Phobos which special-cases for Windows 98 and
> earlier (e.g. std.file using the A functions instead of the W functions if the
> version of Windows that you're running on is too old to have the W functions).
> Now, personally, I would love it if we just said that you have to have at
> least Win2k if not WinXP. It would be_great_ to be able to assume at least
> Vista, since it added a number of useful functions, but XP is still too
> prevalent for that to be reasonable. Regardless, supporting older versions of
> Windows is just plain irritating, since it restricts what you can do, and D is
> new enough and Win2k old enough that I find it perfectly reasonable to insist
> that you have WinXP or newer, but that's not what we're doing at this point.
I'm not even sure W2K support is in great demand. Even XP is on a strong downwards slope, and Win7 has a greater share of the market now. XP is still needed for several years, but Win98...? When was the last time anyone encountered Win98? Does anyone even make software with Win98 support anymore?
I doubt D looses any market share by ditching support for operating systems that doesn't even have vendor support. If it restricts usage on newer operating systems I'm in favor of dropping it, but I guess there's a good reason why Win98 is supported (or just legacy from 10 years back..?)
|
October 20, 2011 Re: [std.database] | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steve Teale | It looks as if it is not a big deal to use the MySQL protocol rather than the client library. I can now log in that way, so the rest should follow, and I am working on the changeover. The current MySQL protocol has been around since version 4.1. Given that Piotr has, I think, already done the same work at protocol level for Postgres, that SQLite is public domain, and that a similar API can be done with ODBC, we should be able to cover a fair range of systems without falling foul of GPL. Steve |
October 20, 2011 Re: [std.database] | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steve Teale | Steve Teale wrote: > It looks as if it is not a big deal to use the MySQL protocol rather than > the client library. I can now log in that way, so the rest should follow, > and I am working on the changeover. The current MySQL protocol has been > around since version 4.1. Good to hear that! One note though. MySQL protocol has two row encoding modes, text or binary. Please consider using the latter for better peformance. > Given that Piotr has, I think, already done the same work at protocol > level for Postgres, that SQLite is public domain, and that a similar API > can be done with ODBC, we should be able to cover a fair range of systems > without falling foul of GPL. Yes, that would be great. |
October 20, 2011 Re: [std.database] | ||||
---|---|---|---|---|
| ||||
Posted in reply to Piotr Szturmaj | >
> Good to hear that! One note though. MySQL protocol has two row encoding modes, text or binary. Please consider using the latter for better performance.
>
>
Certainly - it would be pretty inefficient given the implementation intended to use text.
Steve
|
Copyright © 1999-2021 by the D Language Foundation