[Commits] Rev 3664: MDEV-4181 : ensure mysql client's beep works on all Windows systems. in file:///H:/bzr/5.5/

Vladislav Vaintroub wlad at montyprogram.com
Thu Feb 21 23:54:56 EET 2013


At file:///H:/bzr/5.5/

------------------------------------------------------------
revno: 3664
revision-id: wlad at montyprogram.com-20130220135243-kut3l8r3izci912j
parent: holyfoot at askmonty.org-20130220210345-ln1u3lo30swhipxt
committer: Vladislav Vaintroub <wlad at montyprogram.com>
branch nick: 5.5
timestamp: Wed 2013-02-20 14:52:43 +0100
message:
  MDEV-4181 : ensure mysql client's beep works on all Windows systems.
  Use MessageBeep, which employs sound card, rather than system speaker.
  The secondary benefit is that one can use volume control for this sound
  (see MySQL's Bug #17088)
-------------- next part --------------
=== modified file 'client/mysql.cc'
--- a/client/mysql.cc	2013-01-15 18:13:32 +0000
+++ b/client/mysql.cc	2013-02-20 13:52:43 +0000
@@ -4723,7 +4723,13 @@ put_info(const char *str,INFO_TYPE info_
     if (info_type == INFO_ERROR)
     {
       if (!opt_nobeep)
+      {
+#ifdef _WIN32
+        MessageBeep(MB_ICONWARNING);
+#else
         putchar('\a');                  /* This should make a bell */
+#endif
+      }
       vidattr(A_STANDOUT);
       if (error)
       {



More information about the commits mailing list