[Maria-discuss] MySQL bug affects mariaDB
I think the 'mysql' client with MariaDB has a similar problem as it has with MySQL - refer? http://bugs.mysql.com/bug.php?id=70443 MariaDB installer installs my.ini to /datadir - what with MariaDB is a subfolder to /basedir. The server will look for it correctly as the registry key defining the service has a --default-file specification. But the command line clients don't read the registry key. @Wlad? -- Peter -- Webyog
The command line clients are not services, and they are not started with --defaults-file, this is correct. But 1.We install shortcut to mysql client and shortcut does have --defaults-file , and the default-file points to the right place, i.e whenever you installed the mysql server instance On my machine (I used the default x64 installation), MySQL client shortcut is this C:\Windows\System32\cmd.exe /k " "C:\Program Files\MariaDB 5.5\bin\mysql.exe" "--defaults-file=C:\Program Files\MariaDB 5.5\data\my.ini" -uroot -p"” 2. Out installation also provides another shortcut – called Command Prompt( MariaDB …) It could be used to call arbitrary client utilities, mysqladmin or somesuch .It uses yet another, less known, trick to force client utilities to look for correct my.ini - it sets environment variable MYSQL_HOME to point to the the datadir ( Besides, it also sets PATH to include “bin” directory, so that calling mysqladmin or mysql would not result in “path not found”) The inspiration for this shortcut was a very similar feature of Visual Studio , the “Visual Studio 20xx Command Line”. The summary of my.ini client-side support is that : If you install with MSI, installer will create shortcuts that help client utilities to find correct my.ini . You can have multiple versions of the MariaDB installed, and the shortcuts will still work correctly – every version specific shortcut would point to version-specific my.ini Thus, I’d argue that this bug does not affect MariaDB. From: Maria-developers [mailto:maria-developers-bounces+wlad=montyprogram.com@lists.launchpad.net] On Behalf Of Peter Laursen Sent: Freitag, 27. September 2013 10:06 To: Maria Developers; Maria Discuss Subject: [Maria-developers] MySQL bug affects mariaDB I think the 'mysql' client with MariaDB has a similar problem as it has with MySQL - refer? http://bugs.mysql.com/bug.php?id=70443 MariaDB installer installs my.ini to /datadir - what with MariaDB is a subfolder to /basedir. The server will look for it correctly as the registry key defining the service has a --default-file specification. But the command line clients don't read the registry key. @Wlad? -- Peter -- Webyog
Thanks wlad for explanation, but this applies to 'shortcuts' (in start
menu) only I think, as I understand your reply.
If I navigate ('cd ..') to the /datadir where my.ini resides and launch
'mysql' from commnd line I will need to specify --defaults-file on the
command line, right? If not the client will start with defaults (or it will
use whatever other my.ini it finds in C:\, C:\Windows or /basedir).
?
-- Peter
On Fri, Sep 27, 2013 at 7:06 PM, Vladislav Vaintroub
The command line clients are not services, and they are not started with --defaults-file, this is correct.****
** **
But****
** **
1.We install shortcut to mysql client and shortcut does have --defaults-file , and the default-file points to the right place, i.e whenever you installed the mysql server instance****
On my machine (I used the default x64 installation), MySQL client shortcut is this****
** **
C:\Windows\System32\cmd.exe /k " "C:\Program Files\MariaDB 5.5\bin\mysql.exe" "--defaults-file=C:\Program Files\MariaDB 5.5\data\my.ini" -uroot -p"”****
** **
2. Out installation also provides another shortcut – called Command Prompt( MariaDB …)****
It could be used to call arbitrary client utilities, mysqladmin or somesuch .It uses yet another, less known, trick to force client utilities to look for correct my.ini - it sets environment variable MYSQL_HOME to point to the the datadir ( Besides, it also sets PATH to include “bin” directory, so that calling mysqladmin or mysql would not result in “path not found”)****
** **
The inspiration for this shortcut was a very similar feature of Visual Studio , the “Visual Studio 20xx Command Line”.****
** **
The summary of my.ini client-side support is that :****
If you install with MSI, installer will create shortcuts that help client utilities to find correct my.ini . You can have multiple versions of the MariaDB installed, and the shortcuts will still work correctly – every version specific shortcut would point to version-specific my.ini****
** **
Thus, I’d argue that this bug does not affect MariaDB.****
****
** **
** **
** **
*From:* Maria-developers [mailto:maria-developers-bounces+wlad= montyprogram.com@lists.launchpad.net] *On Behalf Of *Peter Laursen *Sent:* Freitag, 27. September 2013 10:06 *To:* Maria Developers; Maria Discuss *Subject:* [Maria-developers] MySQL bug affects mariaDB****
** **
** **
I think the 'mysql' client with MariaDB has a similar problem as it has with MySQL - refer?****
http://bugs.mysql.com/bug.php?id=70443****
** **
MariaDB installer installs my.ini to /datadir - what with MariaDB is a subfolder to /basedir. ****
** **
The server will look for it correctly as the registry key defining the service has a --default-file specification. But the command line clients don't read the registry key.****
** **
** **
@Wlad?****
** **
** **
-- Peter****
-- Webyog****
** **
** **
Current directory does not play any role in choosing defaults file. You indeed need either to specify –defauilts-file, or set MYSQL_HOME, or the bdefault logic of finding my.ini will apply
On the other hand, I rarely find myself in need to use my.ini for clients. In doubt, I provide –port , and that’s all I need for the command line clients
From: Peter Laursen [mailto:peter_laursen@webyog.com]
Sent: Freitag, 27. September 2013 19:15
To: Vladislav Vaintroub
Cc: Maria Developers; Maria Discuss
Subject: Re: [Maria-developers] MySQL bug affects mariaDB
Thanks wlad for explanation, but this applies to 'shortcuts' (in start menu) only I think, as I understand your reply.
If I navigate ('cd ..') to the /datadir where my.ini resides and launch 'mysql' from commnd line I will need to specify --defaults-file on the command line, right? If not the client will start with defaults (or it will use whatever other my.ini it finds in C:\, C:\Windows or /basedir).
?
-- Peter
On Fri, Sep 27, 2013 at 7:06 PM, Vladislav Vaintroub
"I rarely find myself in need to use my.ini for clients". Not me either
except for max_allowed_packet (what is implemented in both server and
client) that user want to set to INSERT table rows with photographs (.jpg's
typically) to a table.
And the 'mysql' command line client has a default max_allowed_packet of 1MB
(in the server it was raised to 4MB in MySQL 5.6 - and if I remember right
it is 8MB in recent MariaDB - but I belive the client setting is still 1MB
even in MySQL 5.6 - I have not checked though).
In contrast the C-API (both Oracle's and MariaDB's) has a defaut of 1GB
(not sure about other connectors - such as JAVA and .NET). But I am not
aware of any GUI client compiling/linking the connector with client
max_allowed_packet lowered from 1GB (the highest possible value the
protocol allows for currently).
-- Peter
On Fri, Sep 27, 2013 at 8:19 PM, Vladislav Vaintroub
Current directory does not play any role in choosing defaults file. You indeed need either to specify –defauilts-file, or set MYSQL_HOME, or the bdefault logic of finding my.ini will apply ****
On the other hand, I rarely find myself in need to use my.ini for clients. In doubt, I provide –port , and that’s all I need for the command line clients****
** **
*From:* Peter Laursen [mailto:peter_laursen@webyog.com] *Sent:* Freitag, 27. September 2013 19:15 *To:* Vladislav Vaintroub *Cc:* Maria Developers; Maria Discuss *Subject:* Re: [Maria-developers] MySQL bug affects mariaDB****
** **
Thanks wlad for explanation, but this applies to 'shortcuts' (in start menu) only I think, as I understand your reply. ****
** **
If I navigate ('cd ..') to the /datadir where my.ini resides and launch 'mysql' from commnd line I will need to specify --defaults-file on the command line, right? If not the client will start with defaults (or it will use whatever other my.ini it finds in C:\, C:\Windows or /basedir).****
** **
?****
** **
** **
-- Peter****
** **
On Fri, Sep 27, 2013 at 7:06 PM, Vladislav Vaintroub < wlad@montyprogram.com> wrote:****
The command line clients are not services, and they are not started with --defaults-file, this is correct.****
****
But****
****
1.We install shortcut to mysql client and shortcut does have --defaults-file , and the default-file points to the right place, i.e whenever you installed the mysql server instance****
On my machine (I used the default x64 installation), MySQL client shortcut is this****
****
C:\Windows\System32\cmd.exe /k " "C:\Program Files\MariaDB 5.5\bin\mysql.exe" "--defaults-file=C:\Program Files\MariaDB 5.5\data\my.ini" -uroot -p"”****
****
2. Out installation also provides another shortcut – called Command Prompt( MariaDB …)****
It could be used to call arbitrary client utilities, mysqladmin or somesuch .It uses yet another, less known, trick to force client utilities to look for correct my.ini - it sets environment variable MYSQL_HOME to point to the the datadir ( Besides, it also sets PATH to include “bin” directory, so that calling mysqladmin or mysql would not result in “path not found”)****
****
The inspiration for this shortcut was a very similar feature of Visual Studio , the “Visual Studio 20xx Command Line”.****
****
The summary of my.ini client-side support is that :****
If you install with MSI, installer will create shortcuts that help client utilities to find correct my.ini . You can have multiple versions of the MariaDB installed, and the shortcuts will still work correctly – every version specific shortcut would point to version-specific my.ini****
****
Thus, I’d argue that this bug does not affect MariaDB.****
****
****
****
*From:* Maria-developers [mailto:maria-developers-bounces+wlad= montyprogram.com@lists.launchpad.net] *On Behalf Of *Peter Laursen *Sent:* Freitag, 27. September 2013 10:06 *To:* Maria Developers; Maria Discuss *Subject:* [Maria-developers] MySQL bug affects mariaDB****
****
****
I think the 'mysql' client with MariaDB has a similar problem as it has with MySQL - refer?****
http://bugs.mysql.com/bug.php?id=70443****
****
MariaDB installer installs my.ini to /datadir - what with MariaDB is a subfolder to /basedir. ****
****
The server will look for it correctly as the registry key defining the service has a --default-file specification. But the command line clients don't read the registry key.****
****
****
@Wlad?****
****
****
-- Peter****
-- Webyog****
****
****
** **
Please ignore wrong block quote here - stupid mail on iPhone won't paste without it
You know, windows does have easy ways to change the path and add variables to the environment without forcing shell invocation. It is just that in the case of VS you might cross-compile or choose to compile with Vs2008 or vs2012 as they can be installed simultaneously. I think if you are creating a service (in windows parlance) the client should know how to connect to the service sans hoops. Just my opinion... VS is not the way most windows programs do things and you should not violate the principal if least surprise.
--Justin
On Sep 27, 2013, at 1:06 PM, "Vladislav Vaintroub"
wrote: The command line clients are not services, and they are not started with --defaults-file, this is correct.
But
1.We install shortcut to mysql client and shortcut does have --defaults-file , and the default-file points to the right place, i.e whenever you installed the mysql server instance On my machine (I used the default x64 installation), MySQL client shortcut is this
C:\Windows\System32\cmd.exe /k " "C:\Program Files\MariaDB 5.5\bin\mysql.exe" "--defaults-file=C:\Program Files\MariaDB 5.5\data\my.ini" -uroot -p"”
2. Out installation also provides another shortcut – called Command Prompt( MariaDB …) It could be used to call arbitrary client utilities, mysqladmin or somesuch .It uses yet another, less known, trick to force client utilities to look for correct my.ini - it sets environment variable MYSQL_HOME to point to the the datadir ( Besides, it also sets PATH to include “bin” directory, so that calling mysqladmin or mysql would not result in “path not found”)
The inspiration for this shortcut was a very similar feature of Visual Studio , the “Visual Studio 20xx Command Line”.
The summary of my.ini client-side support is that : If you install with MSI, installer will create shortcuts that help client utilities to find correct my.ini . You can have multiple versions of the MariaDB installed, and the shortcuts will still work correctly – every version specific shortcut would point to version-specific my.ini
Thus, I’d argue that this bug does not affect MariaDB.
From: Maria-developers [mailto:maria-developers-bounces+wlad=montyprogram.com@lists.launchpad.net] On Behalf Of Peter Laursen Sent: Freitag, 27. September 2013 10:06 To: Maria Developers; Maria Discuss Subject: [Maria-developers] MySQL bug affects mariaDB
I think the 'mysql' client with MariaDB has a similar problem as it has with MySQL - refer? http://bugs.mysql.com/bug.php?id=70443
MariaDB installer installs my.ini to /datadir - what with MariaDB is a subfolder to /basedir.
The server will look for it correctly as the registry key defining the service has a --default-file specification. But the command line clients don't read the registry key.
@Wlad?
-- Peter -- Webyog
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
Justin, I appreciate your opinion, and if MySQL on Windows would not support multiple versions running on the same machine, I would agree.
But since we (and/or generations of programmers before me) chose to support multiple version of MySQL coexisting on the same machine, and I did not want to break it, I see no real alternative.
From: Justin Swanhart [mailto:greenlion@gmail.com]
Sent: Freitag, 27. September 2013 19:54
To: Vladislav Vaintroub
Cc: Peter Laursen; Maria Developers; Maria Discuss
Subject: Re: [Maria-discuss] [Maria-developers] MySQL bug affects mariaDB
Please ignore wrong block quote here - stupid mail on iPhone won't paste without it
You know, windows does have easy ways to change the path and add variables to the environment without forcing shell invocation. It is just that in the case of VS you might cross-compile or choose to compile with Vs2008 or vs2012 as they can be installed simultaneously. I think if you are creating a service (in windows parlance) the client should know how to connect to the service sans hoops. Just my opinion... VS is not the way most windows programs do things and you should not violate the principal if least surprise.
--Justin
On Sep 27, 2013, at 1:06 PM, "Vladislav Vaintroub"
On Windows multiple MySQL servers run (if only they have distinct basedir,
datadir, port (and/or pipe) and service name). This is how Windows manages
servides (daemons) simply!
And BTW: this is the reason why Windows is a comfortable platform for
application testing if you want to test an application that should work
with multiple MySQL server versions. Multiple MySQL servers on *nix is a
PITA - on Windows it is an ease as the OS has no restriction in this
respect.
-- Peter
On Fri, Sep 27, 2013 at 8:12 PM, Vladislav Vaintroub
Justin, I appreciate your opinion, and if MySQL on Windows would not support multiple versions running on the same machine, I would agree. ****
But since we (and/or generations of programmers before me) chose to support multiple version of MySQL coexisting on the same machine, and I did not want to break it, I see no real alternative. ****
** **
** **
*From:* Justin Swanhart [mailto:greenlion@gmail.com] *Sent:* Freitag, 27. September 2013 19:54 *To:* Vladislav Vaintroub *Cc:* Peter Laursen; Maria Developers; Maria Discuss *Subject:* Re: [Maria-discuss] [Maria-developers] MySQL bug affects mariaDB****
** **
Please ignore wrong block quote here - stupid mail on iPhone won't paste without it****
You know, windows does have easy ways to change the path and add variables to the environment without forcing shell invocation. It is just that in the case of VS you might cross-compile or choose to compile with Vs2008 or vs2012 as they can be installed simultaneously. I think if you are creating a service (in windows parlance) the client should know how to connect to the service sans hoops. Just my opinion... VS is not the way most windows programs do things and you should not violate the principal if least surprise.****
****
--Justin****
On Sep 27, 2013, at 1:06 PM, "Vladislav Vaintroub"
wrote:**** The command line clients are not services, and they are not started with --defaults-file, this is correct.****
****
But****
****
1.We install shortcut to mysql client and shortcut does have --defaults-file , and the default-file points to the right place, i.e whenever you installed the mysql server instance****
On my machine (I used the default x64 installation), MySQL client shortcut is this****
****
C:\Windows\System32\cmd.exe /k " "C:\Program Files\MariaDB 5.5\bin\mysql.exe" "--defaults-file=C:\Program Files\MariaDB 5.5\data\my.ini" -uroot -p"”****
****
2. Out installation also provides another shortcut – called Command Prompt( MariaDB …)****
It could be used to call arbitrary client utilities, mysqladmin or somesuch .It uses yet another, less known, trick to force client utilities to look for correct my.ini - it sets environment variable MYSQL_HOME to point to the the datadir ( Besides, it also sets PATH to include “bin” directory, so that calling mysqladmin or mysql would not result in “path not found”)****
****
The inspiration for this shortcut was a very similar feature of Visual Studio , the “Visual Studio 20xx Command Line”.****
****
The summary of my.ini client-side support is that :****
If you install with MSI, installer will create shortcuts that help client utilities to find correct my.ini . You can have multiple versions of the MariaDB installed, and the shortcuts will still work correctly – every version specific shortcut would point to version-specific my.ini****
****
Thus, I’d argue that this bug does not affect MariaDB.****
****
****
****
*From:* Maria-developers [ mailto:maria-developers-bounces+wlad=montyprogram.com@lists.launchpad.net
] *On Behalf Of *Peter Laursen *Sent:* Freitag, 27. September 2013 10:06 *To:* Maria Developers; Maria Discuss *Subject:* [Maria-developers] MySQL bug affects mariaDB**** ****
****
I think the 'mysql' client with MariaDB has a similar problem as it has with MySQL - refer?****
http://bugs.mysql.com/bug.php?id=70443****
****
MariaDB installer installs my.ini to /datadir - what with MariaDB is a subfolder to /basedir. ****
****
The server will look for it correctly as the registry key defining the service has a --default-file specification. But the command line clients don't read the registry key.****
****
****
@Wlad?****
****
****
-- Peter****
-- Webyog****
****
****
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp****
Am 27.09.2013 20:28, schrieb Peter Laursen:
On Windows multiple MySQL servers run (if only they have distinct basedir, datadir, port (and/or pipe) and service name). This is how Windows manages servides (daemons) simply!
And BTW: this is the reason why Windows is a comfortable platform for application testing if you want to test an application that should work with multiple MySQL server versions. Multiple MySQL servers on *nix is a PITA - on Windows it is an ease as the OS has no restriction in this respect
on Linux also, with systemd like below, yes i had also running multiple MySQL instances before systemd, now it takes 5 minutes and a new instance is running and the rpm-build-process is straight forwared, see the third one which is MySQL while the other both are MariaDB [root@testserver:~]$ cat /usr/lib/systemd/system/mysqld.service [Unit] Description=MariaDB Database Before=network.service [Service] Type=simple ExecStart=/usr/libexec/mysqld --defaults-file=/etc/my.cnf --user=mysql ExecStartPost=/usr/libexec/mysqld-wait-ready $MAINPID Restart=always RestartSec=1 TimeoutSec=300 OOMScoreAdjust=-1000 PrivateTmp=true CapabilityBoundingSet=~CAP_SYS_PTRACE [Install] WantedBy=multi-user.target [root@testserver:~]$ cat /usr/lib/systemd/system/mysqld-dbmail.service [Unit] Description=MariaDB DBMail-Database Before=postfix.service dovecot.service dbmail-imapd.service dbmail-lmtpd.service dbmail-pop3d.service [Service] Type=simple ExecStart=/usr/libexec/mysqld --defaults-file=/etc/my-dbmail.cnf --user=mysql ExecStartPost=/usr/libexec/mysqld-dbmail-wait-ready $MAINPID Restart=always RestartSec=1 TimeoutSec=300 OOMScoreAdjust=-1000 PrivateTmp=true CapabilityBoundingSet=~CAP_SYS_PTRACE [Install] WantedBy=multi-user.target [root@testserver:~]$ cat /usr/lib/systemd/system/mysqld-oracle.service [Unit] Description=MySQL DBMail-Database (Oracle) Before=postfix.service dovecot.service dbmail-imapd.service dbmail-lmtpd.service dbmail-pop3d.service [Service] Type=simple ExecStart=/usr/local/oracle/libexec/mysqld --defaults-file=/etc/my-oracle.cnf --user=mysql Restart=always RestartSec=1 TimeoutSec=300 OOMScoreAdjust=-1000 SysVStartPriority=64 PrivateTmp=true CapabilityBoundingSet=~CAP_SYS_PTRACE [Install] WantedBy=multi-user.target
participants (4)
-
Justin Swanhart
-
Peter Laursen
-
Reindl Harald
-
Vladislav Vaintroub