MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / get_options

Function get_options

mysys/testhash.c:249–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247/* NOTE! DBUG not initialised - no debugging here! */
248
249static int get_options(int argc, char **argv)
250{
251 char *pos,*progname;
252
253 progname= argv[0];
254
255 while (--argc >0 && *(pos = *(++argv)) == '-' ) {
256 switch(*++pos) {
257 case 'm': /* records */
258 recant=atoi(++pos);
259 break;
260 case 't':
261 testflag=atoi(++pos); /* testmod */
262 break;
263 case 'V':
264 case 'I':
265 case '?':
266 printf("%s Ver 1.0 for %s at %s\n",progname,SYSTEM_TYPE,MACHINE_TYPE);
267 printf("MySQL AB, by Monty\n\n");
268 printf("Usage: %s [-?ABIKLWv] [-m#] [-t#]\n",progname);
269 exit(0);
270 case '#':
271 DBUG_PUSH (++pos);
272 break;
273 }
274 }
275 return 0;
276} /* get_options */
277
278
279/* Get a random number in the interval 0 <= x <= n */

Callers 1

mainFunction · 0.70

Calls 1

atoiFunction · 0.85

Tested by

no test coverage detected