Skip to content

Commit 4f08c6d

Browse files
author
Alexander Nozdrin
committed
A follow-up on WL#5154 and WL#5182: remove forgotten options.
1 parent 1befd1f commit 4f08c6d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+95
-288
lines changed

client/mysql.cc

-2
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,6 @@ static COMMANDS commands[] = {
457457
{ "FORCE", 0, 0, 0, ""},
458458
{ "FOREIGN", 0, 0, 0, ""},
459459
{ "FOUND", 0, 0, 0, ""},
460-
{ "FRAC_SECOND", 0, 0, 0, ""},
461460
{ "FROM", 0, 0, 0, ""},
462461
{ "FULL", 0, 0, 0, ""},
463462
{ "FULLTEXT", 0, 0, 0, ""},
@@ -702,7 +701,6 @@ static COMMANDS commands[] = {
702701
{ "SQL_NO_CACHE", 0, 0, 0, ""},
703702
{ "SQL_SMALL_RESULT", 0, 0, 0, ""},
704703
{ "SQL_THREAD", 0, 0, 0, ""},
705-
{ "SQL_TSI_FRAC_SECOND", 0, 0, 0, ""},
706704
{ "SQL_TSI_SECOND", 0, 0, 0, ""},
707705
{ "SQL_TSI_MINUTE", 0, 0, 0, ""},
708706
{ "SQL_TSI_HOUR", 0, 0, 0, ""},

client/mysqladmin.cc

-3
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,6 @@ static struct my_option my_long_options[] =
174174
"Show difference between current and previous values when used with -i. Currently only works with extended-status.",
175175
(uchar**) &opt_relative, (uchar**) &opt_relative, 0, GET_BOOL, NO_ARG, 0, 0, 0,
176176
0, 0, 0},
177-
{"set-variable", 'O',
178-
"Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.",
179-
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
180177
#ifdef HAVE_SMEM
181178
{"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
182179
"Base name of shared memory.", (uchar**) &shared_memory_base_name, (uchar**) &shared_memory_base_name,

mysql-test/lib/My/Options.pm

+4-16
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,6 @@ sub _split_option {
6767
elsif ($option=~ /^(.*)=(.*)$/){
6868
return ($1, $2)
6969
}
70-
elsif ($option=~ /^-O$/){
71-
return (undef, undef);
72-
}
7370
die "Unknown option format '$option'";
7471
}
7572

@@ -169,20 +166,11 @@ sub toSQL {
169166
my @sql;
170167

171168
foreach my $option (@options) {
172-
my ($name, $value)= _split_option($option);
173-
#print "name: $name\n";
169+
my ($sql_name, $value)= _split_option($option);
170+
#print "name: $sql_name\n";
174171
#print "value: $value\n";
175-
if ($name =~ /^O, (.*)/){
176-
push(@sql, "SET GLOBAL $1=$value");
177-
}
178-
elsif ($name =~ /^set-variable=(.*)/){
179-
push(@sql, "SET GLOBAL $1=$value");
180-
}
181-
else {
182-
my $sql_name= $name;
183-
$sql_name=~ s/-/_/g;
184-
push(@sql, "SET GLOBAL $sql_name=$value");
185-
}
172+
$sql_name=~ s/-/_/g;
173+
push(@sql, "SET GLOBAL $sql_name=$value");
186174
}
187175
return join("; ", @sql);
188176
}

mysql-test/lib/mtr_cases.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ sub opts_from_file ($) {
11501150
{
11511151
chomp;
11521152

1153-
# --set-variable=init_connect=set @a='a\\0c'
1153+
# --init_connect=set @a='a\\0c'
11541154
s/^\s+//; # Remove leading space
11551155
s/\s+$//; # Remove ending space
11561156

mysql-test/lib/t/Options.t

+1-13
Original file line numberDiff line numberDiff line change
@@ -45,42 +45,30 @@ my @tests=
4545

4646
[
4747
[ ],
48-
['-O', 'max_binlog_size=1' ],
4948
['--max_binlog_size=1' ]
5049
],
5150

5251
[
53-
['-O', 'max_binlog_size=1' ],
54-
['-O', 'max_binlog_size=1' ],
55-
[ ],
56-
],
57-
58-
[
59-
['-O', 'max_binlog_size=1' ],
6052
[ ],
6153
['--max_binlog_size=default' ]
6254
],
6355

6456
[
6557
[ ],
66-
['-O', 'max_binlog_size=1', '--binlog-format=row' ],
6758
['--max_binlog_size=1', '--binlog-format=row' ]
6859
],
6960
[
7061
['--binlog-format=statement' ],
71-
['-O', 'max_binlog_size=1', '--binlog-format=row' ],
7262
['--max_binlog_size=1', '--binlog-format=row']
7363
],
7464

7565
[
7666
[ '--binlog-format=statement' ],
77-
['-O', 'max_binlog_size=1', '--binlog-format=statement' ],
7867
['--max_binlog_size=1' ]
7968
],
8069

8170
[
8271
[ '--binlog-format=statement' ],
83-
['-O', 'max_binlog_size=1', '--binlog-format=statement' ],
8472
['--max_binlog_size=1' ]
8573
],
8674

@@ -93,7 +81,7 @@ my @tests=
9381

9482
[
9583
[ '--binlog-format=statement' ],
96-
['--relay-log=/path/to/a/relay-log', '-O', 'max_binlog_size=1'],
84+
['--relay-log=/path/to/a/relay-log', '--max_binlog_size=1'],
9785
['--max_binlog_size=1', '--relay-log=/path/to/a/relay-log', '--binlog-format=default' ]
9886
],
9987

mysql-test/lib/v1/mtr_io.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ ($)
8080
{
8181
chomp;
8282

83-
# --set-variable=init_connect=set @a='a\\0c'
83+
# --init_connect=set @a='a\\0c'
8484
s/^\s+//; # Remove leading space
8585
s/\s+$//; # Remove ending space
8686

mysql-test/lib/v1/mysql-test-run.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -3997,7 +3997,7 @@ ($$$$)
39973997
my $slave_load_path= "../tmp";
39983998
mtr_add_arg($args, "%s--slave-load-tmpdir=%s", $prefix,
39993999
$slave_load_path);
4000-
mtr_add_arg($args, "%s--set-variable=slave_net_timeout=120", $prefix);
4000+
mtr_add_arg($args, "%s--slave_net_timeout=120", $prefix);
40014001

40024002
if ( @$slave_master_info )
40034003
{

mysql-test/r/mysqld--help-notwin.result

+1-6
Original file line numberDiff line numberDiff line change
@@ -484,8 +484,7 @@ The following options may be given as the first argument:
484484
the SUPER privilege
485485
--read-rnd-buffer-size=#
486486
When reading rows in sorted order after a sort, the rows
487-
are read through this buffer to avoid a disk seeks. If
488-
not set, then it's set to the value of record_buffer
487+
are read through this buffer to avoid a disk seeks
489488
--relay-log=name The location and name to use for relay logs
490489
--relay-log-index=name
491490
The location and name to use for the file that keeps a
@@ -715,9 +714,6 @@ The following options may be given as the first argument:
715714
Prohibit update of a VIEW, which does not contain a key
716715
of the underlying table and the query uses a LIMIT clause
717716
(usually get from GUI tools)
718-
-s, --use-symbolic-links
719-
Enable symbolic link support. Deprecated option; use
720-
--symbolic-links instead.
721717
-u, --user=name Run mysqld daemon as user.
722718
-v, --verbose Used with --help option for detailed help.
723719
-V, --version Output version information and exit.
@@ -941,7 +937,6 @@ transaction-alloc-block-size 8192
941937
transaction-isolation REPEATABLE-READ
942938
transaction-prealloc-size 4096
943939
updatable-views-with-limit YES
944-
use-symbolic-links FALSE
945940
verbose TRUE
946941
wait-timeout 28800
947942

mysql-test/r/mysqld--help-win.result

+1-6
Original file line numberDiff line numberDiff line change
@@ -484,8 +484,7 @@ The following options may be given as the first argument:
484484
the SUPER privilege
485485
--read-rnd-buffer-size=#
486486
When reading rows in sorted order after a sort, the rows
487-
are read through this buffer to avoid a disk seeks. If
488-
not set, then it's set to the value of record_buffer
487+
are read through this buffer to avoid a disk seeks
489488
--relay-log=name The location and name to use for relay logs
490489
--relay-log-index=name
491490
The location and name to use for the file that keeps a
@@ -719,9 +718,6 @@ The following options may be given as the first argument:
719718
Prohibit update of a VIEW, which does not contain a key
720719
of the underlying table and the query uses a LIMIT clause
721720
(usually get from GUI tools)
722-
-s, --use-symbolic-links
723-
Enable symbolic link support. Deprecated option; use
724-
--symbolic-links instead.
725721
-u, --user=name Run mysqld daemon as user.
726722
-v, --verbose Used with --help option for detailed help.
727723
-V, --version Output version information and exit.
@@ -947,7 +943,6 @@ transaction-alloc-block-size 8192
947943
transaction-isolation REPEATABLE-READ
948944
transaction-prealloc-size 4096
949945
updatable-views-with-limit YES
950-
use-symbolic-links FALSE
951946
verbose TRUE
952947
wait-timeout 28800
953948

Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-O max_binlog_size=4096
1+
--max_binlog_size=4096
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-O max_binlog_size=4096
1+
--max_binlog_size=4096
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-O max_binlog_size=1M --relay-log=$MYSQLTEST_VARDIR/mysqld.1/data/relay-log
1+
--max_binlog_size=1M --relay-log=$MYSQLTEST_VARDIR/mysqld.1/data/relay-log
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-O max_binlog_size=1M --relay-log=$MYSQLTEST_VARDIR/mysqld.2/data/relay-log
1+
--max_binlog_size=1M --relay-log=$MYSQLTEST_VARDIR/mysqld.2/data/relay-log
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-O max_allowed_packet=1024 -O net_buffer_length=1024
1+
--max_allowed_packet=1024 --net_buffer_length=1024
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-O max_allowed_packet=1024 -O net_buffer_length=1024
1+
--max_allowed_packet=1024 --net_buffer_length=1024
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
-O max_relay_log_size=16384
1+
--max_relay_log_size=16384
22
--log-warnings
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
-O max_relay_log_size=16384
1+
--max_relay_log_size=16384
22
--loose-innodb
33
--log-warnings

mysql-test/t/cache_innodb-master.opt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--set-variable=query_cache_size=1M
1+
--query_cache_size=1M
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--set-variable=max_heap_table_size=16384
1+
--max_heap_table_size=16384

mysql-test/t/init_connect-master.opt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--set-variable=init_connect="set @a='a\\0c'"
1+
--init_connect="set @a='a\\0c'"

mysql-test/t/multi_update-master.opt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--set-variable=tmp_table_size=1024
1+
--tmp_table_size=1024

mysql-test/t/multi_update2-master.opt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--set-variable=tmp_table_size=1024
1+
--tmp_table_size=1024
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--set-variable=max_heap_table_size=16384
1+
--max_heap_table_size=16384
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--set-variable=sort_buffer=32804
1+
--sort_buffer=32804

mysys/my_getopt.c

+10-69
Original file line numberDiff line numberDiff line change
@@ -165,69 +165,15 @@ int handle_options(int *argc, char ***argv,
165165
option_is_loose= 0;
166166

167167
cur_arg++; /* skip '-' */
168-
if (*cur_arg == '-' || *cur_arg == 'O') /* check for long option, */
169-
{ /* --set-variable, or -O */
170-
if (*cur_arg == 'O')
171-
{
172-
must_be_var= 1;
173-
174-
if (!(*++cur_arg)) /* If not -Ovar=# */
175-
{
176-
/* the argument must be in next argv */
177-
if (!*++pos)
178-
{
179-
if (my_getopt_print_errors)
180-
my_getopt_error_reporter(ERROR_LEVEL,
181-
"%s: Option '-O' requires an argument",
182-
my_progname);
183-
return EXIT_ARGUMENT_REQUIRED;
184-
}
185-
cur_arg= *pos;
186-
(*argc)--;
187-
}
188-
}
189-
else if (!getopt_compare_strings(cur_arg, "-set-variable", 13))
190-
{
191-
must_be_var= 1;
192-
if (cur_arg[13] == '=')
193-
{
194-
cur_arg+= 14;
195-
if (!*cur_arg)
196-
{
197-
if (my_getopt_print_errors)
198-
my_getopt_error_reporter(ERROR_LEVEL,
199-
"%s: Option '--set-variable' requires an argument",
200-
my_progname);
201-
return EXIT_ARGUMENT_REQUIRED;
202-
}
203-
}
204-
else if (cur_arg[14]) /* garbage, or another option. break out */
205-
must_be_var= 0;
206-
else
207-
{
208-
/* the argument must be in next argv */
209-
if (!*++pos)
210-
{
211-
if (my_getopt_print_errors)
212-
my_getopt_error_reporter(ERROR_LEVEL,
213-
"%s: Option '--set-variable' requires an argument",
214-
my_progname);
215-
return EXIT_ARGUMENT_REQUIRED;
216-
}
217-
cur_arg= *pos;
218-
(*argc)--;
219-
}
220-
}
221-
else if (!must_be_var)
222-
{
223-
if (!*++cur_arg) /* skip the double dash */
224-
{
225-
/* '--' means end of options, look no further */
226-
end_of_options= 1;
227-
(*argc)--;
228-
continue;
229-
}
230-
}
168+
if (*cur_arg == '-') /* check for long option, */
169+
{
170+
if (!*++cur_arg) /* skip the double dash */
171+
{
172+
/* '--' means end of options, look no further */
173+
end_of_options= 1;
174+
(*argc)--;
175+
continue;
176+
}
231177
opt_str= check_struct_option(cur_arg, key_name);
232178
optend= strcend(opt_str, '=');
233179
length= (uint) (optend - opt_str);
@@ -307,12 +253,7 @@ int handle_options(int *argc, char ***argv,
307253
{
308254
if (my_getopt_skip_unknown)
309255
{
310-
/*
311-
preserve all the components of this unknown option, this may
312-
occurr when the user provides options like: "-O foo" or
313-
"--set-variable foo" (note that theres a space in there)
314-
Generally, these kind of options are to be avoided
315-
*/
256+
/* Preserve all the components of this unknown option. */
316257
do {
317258
(*argv)[argvpos++]= *first++;
318259
} while (first <= pos);

netware/my_manage.c

+2-4
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,7 @@ int wait_for_server_start(char *bin_dir, char *user, char *password, int port,ch
201201
add_arg(&al, "--silent");
202202

203203
#ifdef NOT_USED
204-
add_arg(&al, "-O");
205-
add_arg(&al, "connect_timeout=10");
204+
add_arg(&al, "--connect_timeout=10");
206205
add_arg(&al, "-w");
207206
#endif
208207

@@ -301,8 +300,7 @@ int stop_server(char *bin_dir, char *user, char *password, int port,
301300
add_arg(&al, "--port=%u", port);
302301
add_arg(&al, "--user=%s", user);
303302
add_arg(&al, "--password=%s", password);
304-
add_arg(&al, "-O");
305-
add_arg(&al, "shutdown_timeout=20");
303+
add_arg(&al, "--shutdown_timeout=20");
306304
add_arg(&al, "shutdown");
307305

308306
// spawn

0 commit comments

Comments
 (0)