diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2013-02-20 14:52:43 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2013-02-20 14:52:43 +0100 |
commit | e03e9aab7304395575d8ae3a54835fec854dd872 (patch) | |
tree | ae324d1f90fdda24053eae9061266e05e3fcdbc9 /client/mysql.cc | |
parent | ca29490102f02527a9b36b1300c8483dc98062dc (diff) | |
download | mariadb-git-e03e9aab7304395575d8ae3a54835fec854dd872.tar.gz |
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)
Diffstat (limited to 'client/mysql.cc')
-rw-r--r-- | client/mysql.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 67878b36227..70c0815ea76 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -4723,7 +4723,13 @@ put_info(const char *str,INFO_TYPE info_type, uint error, const char *sqlstate) 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) { |