summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjcole@mugatu.spaceapes.com <>2002-03-11 14:37:09 -0600
committerjcole@mugatu.spaceapes.com <>2002-03-11 14:37:09 -0600
commit39c4a730fd736c4701c16654fe43a6ecc14c180c (patch)
tree2ad5803bf435a10610b80178946db1548b737549
parentbf12fde0bde8768fc191646cdd4bd2e02ce84b06 (diff)
parent3024c35be743e296e8784fa2fd1ebb6cbfba2d28 (diff)
downloadmariadb-git-39c4a730fd736c4701c16654fe43a6ecc14c180c.tar.gz
Merge jcole@work.mysql.com:/home/bk/mysql-4.0
into mugatu.spaceapes.com:/home/jcole/bk/mysql-4.0
-rw-r--r--BitKeeper/etc/logging_ok1
-rw-r--r--client/mysql.cc13
2 files changed, 11 insertions, 3 deletions
diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok
index 1667ffe7e9c..6646091223b 100644
--- a/BitKeeper/etc/logging_ok
+++ b/BitKeeper/etc/logging_ok
@@ -46,3 +46,4 @@ tonu@x153.internalnet
tonu@x3.internalnet
venu@work.mysql.com
zak@linux.local
+jcole@mugatu.spaceapes.com
diff --git a/client/mysql.cc b/client/mysql.cc
index df329b04481..4f3bce2e935 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -118,7 +118,8 @@ static bool info_flag=0,ignore_errors=0,wait_flag=0,quick=0,
no_rehash=0,skip_updates=0,safe_updates=0,one_database=0,
opt_compress=0, using_opt_local_infile=0,
vertical=0,skip_line_numbers=0,skip_column_names=0,opt_html=0,
- opt_xml=0,opt_nopager=1, opt_outfile=0, no_named_cmds=1;
+ opt_xml=0,opt_nopager=1, opt_outfile=0, no_named_cmds=1,
+ opt_nobeep=0;
static uint verbose=0,opt_silent=0,opt_mysql_port=0, opt_local_infile=0;
static my_string opt_mysql_unix_port=0;
static int connect_flag=CLIENT_INTERACTIVE;
@@ -438,6 +439,7 @@ static struct option long_options[] =
{"ignore-spaces", no_argument, 0, 'i'},
{"local-infile", optional_argument, 0, OPT_LOCAL_INFILE},
{"no-auto-rehash",no_argument, 0, 'A'},
+ {"no-beep", no_argument, 0, 'b'},
{"no-named-commands", no_argument, 0, 'g'},
{"no-tee", no_argument, 0, OPT_NOTEE},
#ifndef __WIN__
@@ -501,6 +503,7 @@ static void usage(int version)
-A, --no-auto-rehash No automatic rehashing. One has to use 'rehash' to\n\
get table and field completion. This gives a quicker\n\
start of mysql and disables rehashing on reconnect.\n\
+ -b, --no-beep Turn off beep on error.\n\
-B, --batch Print results with a tab as separator, each row on\n\
a new line. Doesn't use history file.\n\
--character-sets-dir=...\n\
@@ -604,7 +607,7 @@ static int get_options(int argc, char **argv)
set_all_changeable_vars(changeable_vars);
while ((c=getopt_long(argc,argv,
- (char*) "?ABCD:LfgGHXinNoqrstTU::vVw::WEe:h:O:P:S:u:#::p::",
+ (char*) "?AbBCD:LfgGHXinNoqrstTU::vVw::WEe:h:O:P:S:u:#::p::",
long_options, &option_index)) != EOF)
{
switch(c) {
@@ -615,6 +618,9 @@ static int get_options(int argc, char **argv)
strmov(mysql_charsets_dir, optarg);
charsets_dir = mysql_charsets_dir;
break;
+ case 'b':
+ opt_nobeep = 1;
+ break;
case OPT_TEE:
if (!opt_outfile && strlen(optarg))
{
@@ -2441,7 +2447,8 @@ put_info(const char *str,INFO_TYPE info_type,uint error)
}
if (info_type == INFO_ERROR)
{
- putchar('\007'); /* This should make a bell */
+ if(!opt_nobeep)
+ putchar('\007'); /* This should make a bell */
vidattr(A_STANDOUT);
if (error)
(void) tee_fprintf(stderr, "ERROR %d: ", error);