Skip to content

Commit 4280b25

Browse files
committed
--getopt-prefix-matching command-line option
1 parent 0ce8703 commit 4280b25

39 files changed

+88
-58
lines changed

include/my_getopt.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ typedef void *(*my_getopt_value)(const char *, uint, const struct my_option *,
102102
extern char *disabled_my_option;
103103
extern my_bool my_getopt_print_errors;
104104
extern my_bool my_getopt_skip_unknown;
105+
extern my_bool my_getopt_prefix_matching;
105106
extern my_error_reporter my_getopt_error_reporter;
106107

107108
extern int handle_options (int *argc, char ***argv,

mysql-test/include/default_mysqld.cnf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
# Default values that applies to all MySQL Servers
1818
[mysqld]
19+
disable-getopt-prefix-matching
20+
1921
open-files-limit= 1024
2022
local-infile
2123
character-set-server= latin1

mysql-test/include/have_innodb.combinations

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ ignore-builtin-innodb
33
plugin-load-add=$HA_INNODB_SO
44
innodb
55
innodb-cmpmem
6+
innodb-cmp-per-index
67
innodb-trx
8+
innodb-locks
79
innodb-buffer-pool-stats
810
innodb-buffer-page
911
innodb-buffer-page-lru
1012
innodb-sys-foreign
11-
innodb-sys-foreign-col
13+
innodb-sys-foreign-cols
1214
innodb-sys-tables
1315
innodb-metrics
1416

@@ -17,24 +19,27 @@ ignore-builtin-innodb
1719
plugin-load-add=$HA_XTRADB_SO
1820
innodb
1921
innodb-cmpmem
22+
innodb-cmp-per-index
2023
innodb-trx
24+
innodb-locks
2125
innodb-buffer-pool-stats
2226
innodb-buffer-page
2327
innodb-buffer-page-lru
2428
innodb-sys-foreign
25-
innodb-sys-foreign-col
29+
innodb-sys-foreign-cols
2630
innodb-sys-tables
2731
innodb-metrics
2832

2933
[xtradb]
3034
innodb
3135
innodb-cmpmem
36+
innodb-cmp-per-index
3237
innodb-trx
38+
innodb-locks
3339
innodb-metrics
3440
innodb-buffer-pool-stats
3541
innodb-buffer-page
3642
innodb-buffer-page-lru
3743
innodb-sys-foreign
38-
innodb-sys-foreign-col
44+
innodb-sys-foreign-cols
3945
innodb-sys-tables
40-
innodb-metrics

mysql-test/include/have_xtradb.combinations

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ plugin-load-add=$HA_XTRADB_SO
44
innodb
55
innodb-cmpmem
66
innodb-trx
7-
innodb-sys-index
7+
innodb-sys-indexes
88

99
[xtradb]
1010
innodb
1111
innodb-cmpmem
1212
innodb-trx
13-
innodb-sys-index
13+
innodb-sys-indexes

mysql-test/r/information_schema_all_engines.result

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ INNODB_CMPMEM
2323
INNODB_CMPMEM_RESET
2424
INNODB_CMP_PER_INDEX
2525
INNODB_CMP_RESET
26-
INNODB_LOCKS
2726
INNODB_LOCK_WAITS
2827
INNODB_SYS_COLUMNS
2928
INNODB_SYS_FIELDS
@@ -95,7 +94,6 @@ INNODB_CMPMEM page_size
9594
INNODB_CMPMEM_RESET page_size
9695
INNODB_CMP_PER_INDEX database_name
9796
INNODB_CMP_RESET page_size
98-
INNODB_LOCKS lock_id
9997
INNODB_LOCK_WAITS requesting_trx_id
10098
INNODB_SYS_COLUMNS TABLE_ID
10199
INNODB_SYS_FIELDS INDEX_ID
@@ -167,7 +165,6 @@ INNODB_CMPMEM page_size
167165
INNODB_CMPMEM_RESET page_size
168166
INNODB_CMP_PER_INDEX database_name
169167
INNODB_CMP_RESET page_size
170-
INNODB_LOCKS lock_id
171168
INNODB_LOCK_WAITS requesting_trx_id
172169
INNODB_SYS_COLUMNS TABLE_ID
173170
INNODB_SYS_FIELDS INDEX_ID
@@ -244,7 +241,6 @@ INNODB_CMPMEM information_schema.INNODB_CMPMEM 1
244241
INNODB_CMPMEM_RESET information_schema.INNODB_CMPMEM_RESET 1
245242
INNODB_CMP_PER_INDEX information_schema.INNODB_CMP_PER_INDEX 1
246243
INNODB_CMP_RESET information_schema.INNODB_CMP_RESET 1
247-
INNODB_LOCKS information_schema.INNODB_LOCKS 1
248244
INNODB_LOCK_WAITS information_schema.INNODB_LOCK_WAITS 1
249245
INNODB_SYS_COLUMNS information_schema.INNODB_SYS_COLUMNS 1
250246
INNODB_SYS_FIELDS information_schema.INNODB_SYS_FIELDS 1
@@ -306,7 +302,6 @@ Database: information_schema
306302
| INNODB_CMPMEM_RESET |
307303
| INNODB_CMP_PER_INDEX |
308304
| INNODB_CMP_RESET |
309-
| INNODB_LOCKS |
310305
| INNODB_LOCK_WAITS |
311306
| INNODB_SYS_COLUMNS |
312307
| INNODB_SYS_FIELDS |
@@ -368,7 +363,6 @@ Database: INFORMATION_SCHEMA
368363
| INNODB_CMPMEM_RESET |
369364
| INNODB_CMP_PER_INDEX |
370365
| INNODB_CMP_RESET |
371-
| INNODB_LOCKS |
372366
| INNODB_LOCK_WAITS |
373367
| INNODB_SYS_COLUMNS |
374368
| INNODB_SYS_FIELDS |
@@ -411,5 +405,5 @@ Wildcard: inf_rmation_schema
411405
| information_schema |
412406
SELECT table_schema, count(*) FROM information_schema.TABLES WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') GROUP BY TABLE_SCHEMA;
413407
table_schema count(*)
414-
information_schema 57
408+
information_schema 56
415409
mysql 30

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,10 @@ The following options may be given as the first argument:
205205
mysql.general_logif --log-output=TABLE is used
206206
--general-log-file=name
207207
Log connections and queries to given file
208+
--getopt-prefix-matching
209+
Recognize command-line options by their unambiguos
210+
prefixes.
211+
(Defaults to on; use --skip-getopt-prefix-matching to disable.)
208212
--group-concat-max-len=#
209213
The maximum length of the result of function
210214
GROUP_CONCAT()
@@ -1152,6 +1156,7 @@ ft-query-expansion-limit 20
11521156
ft-stopword-file (No default value)
11531157
gdb FALSE
11541158
general-log FALSE
1159+
getopt-prefix-matching TRUE
11551160
group-concat-max-len 1024
11561161
gtid-domain-id 0
11571162
gtid-ignore-duplicates FALSE
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--slave-skip-error=1053,1062,1582
1+
--slave-skip-errors=1053,1062,1582
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--skip-stack-trace --skip-core-file --loose-aria-log-dir-path=$MYSQLTEST_VARDIR/tmp --myisam-recover=
1+
--skip-stack-trace --skip-core-file --loose-aria-log-dir-path=$MYSQLTEST_VARDIR/tmp --myisam-recover-options=
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--skip-stack-trace --skip-core-file --myisam-recover-option=off
1+
--skip-stack-trace --skip-core-file --myisam-recover-options=off
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--myisam-recover
1+
--myisam-recover-options

0 commit comments

Comments
 (0)