428
237
static char *get_arg(char *line, bool get_next_arg);
429
238
static void init_username(void);
430
239
static void add_int_to_prompt(int toadd);
431
static int get_result_width(drizzle_result_st *res);
432
static int get_field_disp_length(drizzle_column_st * field);
433
static const char * strcont(const char *str, const char *set);
240
static int get_result_width(DRIZZLE_RES *res);
241
static int get_field_disp_length(DRIZZLE_FIELD * field);
242
static const char * strcont(register const char *str, register const char *set);
435
/* A class which contains information on the commands this program
244
/* A structure which contains information on the commands this program
436
245
can understand. */
440
247
const char *name; /* User printable name of the function. */
441
248
char cmd_char; /* msql command character */
443
Commands(const char *in_name,
445
int (*in_func)(string *str,const char *name),
446
bool in_takes_params,
450
cmd_char(in_cmd_char),
452
takes_params(in_takes_params),
465
int (*func)(string *str,const char *);/* Function to call to do the job. */
467
const char *getName() const
472
char getCmdChar() const
477
bool getTakesParams() const
482
const char *getDoc() const
487
void setName(const char *in_name)
492
void setCmdChar(char in_cmd_char)
494
cmd_char= in_cmd_char;
497
void setTakesParams(bool in_takes_params)
499
takes_params= in_takes_params;
502
void setDoc(const char *in_doc)
249
int (*func)(string *str,const char *); /* Function to call to do the job. */
508
250
bool takes_params; /* Max parameters for command */
509
251
const char *doc; /* Documentation for this function. */
513
static Commands commands[] = {
514
Commands( "?", '?', com_help, 0, N_("Synonym for `help'.") ),
515
Commands( "clear", 'c', com_clear, 0, N_("Clear command.")),
516
Commands( "connect",'r', com_connect,1,
517
N_("Reconnect to the server. Optional arguments are db and host.")),
518
Commands( "delimiter", 'd', com_delimiter, 1,
519
N_("Set statement delimiter. NOTE: Takes the rest of the line as new delimiter.") ),
520
Commands( "ego", 'G', com_ego, 0,
521
N_("Send command to drizzle server, display result vertically.")),
522
Commands( "exit", 'q', com_quit, 0, N_("Exit drizzle. Same as quit.")),
523
Commands( "go", 'g', com_go, 0, N_("Send command to drizzle server.") ),
524
Commands( "help", 'h', com_help, 0, N_("Display this help.") ),
525
Commands( "nopager",'n', com_nopager,0, N_("Disable pager, print to stdout.") ),
526
Commands( "notee", 't', com_notee, 0, N_("Don't write into outfile.") ),
527
Commands( "pager", 'P', com_pager, 1,
528
N_("Set PAGER [to_pager]. Print the query results via PAGER.") ),
529
Commands( "print", 'p', com_print, 0, N_("Print current command.") ),
530
Commands( "prompt", 'R', com_prompt, 1, N_("Change your drizzle prompt.")),
531
Commands( "quit", 'q', com_quit, 0, N_("Quit drizzle.") ),
532
Commands( "rehash", '#', com_rehash, 0, N_("Rebuild completion hash.") ),
533
Commands( "source", '.', com_source, 1,
534
N_("Execute an SQL script file. Takes a file name as an argument.")),
535
Commands( "status", 's', com_status, 0, N_("Get status information from the server.")),
536
Commands( "tee", 'T', com_tee, 1,
537
N_("Set outfile [to_outfile]. Append everything into given outfile.") ),
538
Commands( "use", 'u', com_use, 1,
539
N_("Use another schema. Takes schema name as argument.") ),
540
Commands( "shutdown", 'u', com_shutdown, 1,
541
N_("Shutdown the instance you are connected too.") ),
542
Commands( "warnings", 'W', com_warnings, 0,
543
N_("Show warnings after every statement.") ),
544
Commands( "nowarning", 'w', com_nowarnings, 0,
545
N_("Don't show warnings after every statement.") ),
255
static COMMANDS commands[] = {
256
{ "?", '?', com_help, 1, N_("Synonym for `help'.") },
257
{ "clear", 'c', com_clear, 0, N_("Clear command.")},
258
{ "connect",'r', com_connect,1,
259
N_("Reconnect to the server. Optional arguments are db and host." }),
260
{ "delimiter", 'd', com_delimiter, 1,
261
N_("Set statement delimiter. NOTE: Takes the rest of the line as new delimiter.") },
262
{ "ego", 'G', com_ego, 0,
263
N_("Send command to drizzle server, display result vertically.")},
264
{ "exit", 'q', com_quit, 0, N_("Exit drizzle. Same as quit.")},
265
{ "go", 'g', com_go, 0, N_("Send command to drizzle server.") },
266
{ "help", 'h', com_help, 1, N_("Display this help.") },
267
{ "nopager",'n', com_nopager,0, N_("Disable pager, print to stdout.") },
268
{ "notee", 't', com_notee, 0, N_("Don't write into outfile.") },
269
{ "pager", 'P', com_pager, 1,
270
N_("Set PAGER [to_pager]. Print the query results via PAGER.") },
271
{ "print", 'p', com_print, 0, N_("Print current command.") },
272
{ "prompt", 'R', com_prompt, 1, N_("Change your drizzle prompt.")},
273
{ "quit", 'q', com_quit, 0, N_("Quit drizzle.") },
274
{ "rehash", '#', com_rehash, 0, N_("Rebuild completion hash.") },
275
{ "source", '.', com_source, 1,
276
N_("Execute an SQL script file. Takes a file name as an argument.")},
277
{ "status", 's', com_status, 0, N_("Get status information from the server.")},
278
{ "tee", 'T', com_tee, 1,
279
N_("Set outfile [to_outfile]. Append everything into given outfile.") },
280
{ "use", 'u', com_use, 1,
281
N_("Use another database. Takes database name as argument.") },
282
{ "warnings", 'W', com_warnings, 0,
283
N_("Show warnings after every statement.") },
284
{ "nowarning", 'w', com_nowarnings, 0,
285
N_("Don't show warnings after every statement.") },
546
286
/* Get bash-like expansion for some commands */
547
Commands( "create table", 0, 0, 0, ""),
548
Commands( "create database", 0, 0, 0, ""),
549
Commands( "show databases", 0, 0, 0, ""),
550
Commands( "show fields from", 0, 0, 0, ""),
551
Commands( "show keys from", 0, 0, 0, ""),
552
Commands( "show tables", 0, 0, 0, ""),
553
Commands( "load data from", 0, 0, 0, ""),
554
Commands( "alter table", 0, 0, 0, ""),
555
Commands( "set option", 0, 0, 0, ""),
556
Commands( "lock tables", 0, 0, 0, ""),
557
Commands( "unlock tables", 0, 0, 0, ""),
287
{ "create table", 0, 0, 0, ""},
288
{ "create database", 0, 0, 0, ""},
289
{ "show databases", 0, 0, 0, ""},
290
{ "show fields from", 0, 0, 0, ""},
291
{ "show keys from", 0, 0, 0, ""},
292
{ "show tables", 0, 0, 0, ""},
293
{ "load data from", 0, 0, 0, ""},
294
{ "alter table", 0, 0, 0, ""},
295
{ "set option", 0, 0, 0, ""},
296
{ "lock tables", 0, 0, 0, ""},
297
{ "unlock tables", 0, 0, 0, ""},
558
298
/* generated 2006-12-28. Refresh occasionally from lexer. */
559
Commands( "ACTION", 0, 0, 0, ""),
560
Commands( "ADD", 0, 0, 0, ""),
561
Commands( "AFTER", 0, 0, 0, ""),
562
Commands( "AGAINST", 0, 0, 0, ""),
563
Commands( "AGGREGATE", 0, 0, 0, ""),
564
Commands( "ALL", 0, 0, 0, ""),
565
Commands( "ALGORITHM", 0, 0, 0, ""),
566
Commands( "ALTER", 0, 0, 0, ""),
567
Commands( "ANALYZE", 0, 0, 0, ""),
568
Commands( "AND", 0, 0, 0, ""),
569
Commands( "ANY", 0, 0, 0, ""),
570
Commands( "AS", 0, 0, 0, ""),
571
Commands( "ASC", 0, 0, 0, ""),
572
Commands( "ASCII", 0, 0, 0, ""),
573
Commands( "ASENSITIVE", 0, 0, 0, ""),
574
Commands( "AUTO_INCREMENT", 0, 0, 0, ""),
575
Commands( "AVG", 0, 0, 0, ""),
576
Commands( "AVG_ROW_LENGTH", 0, 0, 0, ""),
577
Commands( "BEFORE", 0, 0, 0, ""),
578
Commands( "BEGIN", 0, 0, 0, ""),
579
Commands( "BETWEEN", 0, 0, 0, ""),
580
Commands( "BIGINT", 0, 0, 0, ""),
581
Commands( "BINARY", 0, 0, 0, ""),
582
Commands( "BIT", 0, 0, 0, ""),
583
Commands( "BLOB", 0, 0, 0, ""),
584
Commands( "BOOL", 0, 0, 0, ""),
585
Commands( "BOOLEAN", 0, 0, 0, ""),
586
Commands( "BOTH", 0, 0, 0, ""),
587
Commands( "BTREE", 0, 0, 0, ""),
588
Commands( "BY", 0, 0, 0, ""),
589
Commands( "BYTE", 0, 0, 0, ""),
590
Commands( "CACHE", 0, 0, 0, ""),
591
Commands( "CALL", 0, 0, 0, ""),
592
Commands( "CASCADE", 0, 0, 0, ""),
593
Commands( "CASCADED", 0, 0, 0, ""),
594
Commands( "CASE", 0, 0, 0, ""),
595
Commands( "CHAIN", 0, 0, 0, ""),
596
Commands( "CHANGE", 0, 0, 0, ""),
597
Commands( "CHANGED", 0, 0, 0, ""),
598
Commands( "CHAR", 0, 0, 0, ""),
599
Commands( "CHARACTER", 0, 0, 0, ""),
600
Commands( "CHECK", 0, 0, 0, ""),
601
Commands( "CHECKSUM", 0, 0, 0, ""),
602
Commands( "CLIENT", 0, 0, 0, ""),
603
Commands( "CLOSE", 0, 0, 0, ""),
604
Commands( "COLLATE", 0, 0, 0, ""),
605
Commands( "COLLATION", 0, 0, 0, ""),
606
Commands( "COLUMN", 0, 0, 0, ""),
607
Commands( "COLUMNS", 0, 0, 0, ""),
608
Commands( "COMMENT", 0, 0, 0, ""),
609
Commands( "COMMIT", 0, 0, 0, ""),
610
Commands( "COMMITTED", 0, 0, 0, ""),
611
Commands( "COMPACT", 0, 0, 0, ""),
612
Commands( "COMPRESSED", 0, 0, 0, ""),
613
Commands( "CONCURRENT", 0, 0, 0, ""),
614
Commands( "CONDITION", 0, 0, 0, ""),
615
Commands( "CONNECTION", 0, 0, 0, ""),
616
Commands( "CONSISTENT", 0, 0, 0, ""),
617
Commands( "CONSTRAINT", 0, 0, 0, ""),
618
Commands( "CONTAINS", 0, 0, 0, ""),
619
Commands( "CONTINUE", 0, 0, 0, ""),
620
Commands( "CONVERT", 0, 0, 0, ""),
621
Commands( "CREATE", 0, 0, 0, ""),
622
Commands( "CROSS", 0, 0, 0, ""),
623
Commands( "CUBE", 0, 0, 0, ""),
624
Commands( "CURRENT_DATE", 0, 0, 0, ""),
625
Commands( "CURRENT_TIMESTAMP", 0, 0, 0, ""),
626
Commands( "CURRENT_USER", 0, 0, 0, ""),
627
Commands( "CURSOR", 0, 0, 0, ""),
628
Commands( "DATA", 0, 0, 0, ""),
629
Commands( "DATABASE", 0, 0, 0, ""),
630
Commands( "DATABASES", 0, 0, 0, ""),
631
Commands( "DATE", 0, 0, 0, ""),
632
Commands( "DATETIME", 0, 0, 0, ""),
633
Commands( "DAY", 0, 0, 0, ""),
634
Commands( "DAY_HOUR", 0, 0, 0, ""),
635
Commands( "DAY_MICROSECOND", 0, 0, 0, ""),
636
Commands( "DAY_MINUTE", 0, 0, 0, ""),
637
Commands( "DAY_SECOND", 0, 0, 0, ""),
638
Commands( "DEALLOCATE", 0, 0, 0, ""),
639
Commands( "DEC", 0, 0, 0, ""),
640
Commands( "DECIMAL", 0, 0, 0, ""),
641
Commands( "DECLARE", 0, 0, 0, ""),
642
Commands( "DEFAULT", 0, 0, 0, ""),
643
Commands( "DEFINER", 0, 0, 0, ""),
644
Commands( "DELAYED", 0, 0, 0, ""),
645
Commands( "DELETE", 0, 0, 0, ""),
646
Commands( "DESC", 0, 0, 0, ""),
647
Commands( "DESCRIBE", 0, 0, 0, ""),
648
Commands( "DETERMINISTIC", 0, 0, 0, ""),
649
Commands( "DISABLE", 0, 0, 0, ""),
650
Commands( "DISCARD", 0, 0, 0, ""),
651
Commands( "DISTINCT", 0, 0, 0, ""),
652
Commands( "DISTINCTROW", 0, 0, 0, ""),
653
Commands( "DIV", 0, 0, 0, ""),
654
Commands( "DOUBLE", 0, 0, 0, ""),
655
Commands( "DROP", 0, 0, 0, ""),
656
Commands( "DUMPFILE", 0, 0, 0, ""),
657
Commands( "DUPLICATE", 0, 0, 0, ""),
658
Commands( "DYNAMIC", 0, 0, 0, ""),
659
Commands( "EACH", 0, 0, 0, ""),
660
Commands( "ELSE", 0, 0, 0, ""),
661
Commands( "ELSEIF", 0, 0, 0, ""),
662
Commands( "ENABLE", 0, 0, 0, ""),
663
Commands( "ENCLOSED", 0, 0, 0, ""),
664
Commands( "END", 0, 0, 0, ""),
665
Commands( "ENGINE", 0, 0, 0, ""),
666
Commands( "ENGINES", 0, 0, 0, ""),
667
Commands( "ENUM", 0, 0, 0, ""),
668
Commands( "ERRORS", 0, 0, 0, ""),
669
Commands( "ESCAPE", 0, 0, 0, ""),
670
Commands( "ESCAPED", 0, 0, 0, ""),
671
Commands( "EXISTS", 0, 0, 0, ""),
672
Commands( "EXIT", 0, 0, 0, ""),
673
Commands( "EXPLAIN", 0, 0, 0, ""),
674
Commands( "EXTENDED", 0, 0, 0, ""),
675
Commands( "FALSE", 0, 0, 0, ""),
676
Commands( "FAST", 0, 0, 0, ""),
677
Commands( "FETCH", 0, 0, 0, ""),
678
Commands( "FIELDS", 0, 0, 0, ""),
679
Commands( "FILE", 0, 0, 0, ""),
680
Commands( "FIRST", 0, 0, 0, ""),
681
Commands( "FIXED", 0, 0, 0, ""),
682
Commands( "FLOAT", 0, 0, 0, ""),
683
Commands( "FLOAT4", 0, 0, 0, ""),
684
Commands( "FLOAT8", 0, 0, 0, ""),
685
Commands( "FLUSH", 0, 0, 0, ""),
686
Commands( "FOR", 0, 0, 0, ""),
687
Commands( "FORCE", 0, 0, 0, ""),
688
Commands( "FOREIGN", 0, 0, 0, ""),
689
Commands( "FOUND", 0, 0, 0, ""),
690
Commands( "FRAC_SECOND", 0, 0, 0, ""),
691
Commands( "FROM", 0, 0, 0, ""),
692
Commands( "FULL", 0, 0, 0, ""),
693
Commands( "FUNCTION", 0, 0, 0, ""),
694
Commands( "GLOBAL", 0, 0, 0, ""),
695
Commands( "GRANT", 0, 0, 0, ""),
696
Commands( "GRANTS", 0, 0, 0, ""),
697
Commands( "GROUP", 0, 0, 0, ""),
698
Commands( "HANDLER", 0, 0, 0, ""),
699
Commands( "HASH", 0, 0, 0, ""),
700
Commands( "HAVING", 0, 0, 0, ""),
701
Commands( "HELP", 0, 0, 0, ""),
702
Commands( "HIGH_PRIORITY", 0, 0, 0, ""),
703
Commands( "HOSTS", 0, 0, 0, ""),
704
Commands( "HOUR", 0, 0, 0, ""),
705
Commands( "HOUR_MICROSECOND", 0, 0, 0, ""),
706
Commands( "HOUR_MINUTE", 0, 0, 0, ""),
707
Commands( "HOUR_SECOND", 0, 0, 0, ""),
708
Commands( "IDENTIFIED", 0, 0, 0, ""),
709
Commands( "IF", 0, 0, 0, ""),
710
Commands( "IGNORE", 0, 0, 0, ""),
711
Commands( "IMPORT", 0, 0, 0, ""),
712
Commands( "IN", 0, 0, 0, ""),
713
Commands( "INDEX", 0, 0, 0, ""),
714
Commands( "INDEXES", 0, 0, 0, ""),
715
Commands( "INFILE", 0, 0, 0, ""),
716
Commands( "INNER", 0, 0, 0, ""),
717
Commands( "INNOBASE", 0, 0, 0, ""),
718
Commands( "INNODB", 0, 0, 0, ""),
719
Commands( "INOUT", 0, 0, 0, ""),
720
Commands( "INSENSITIVE", 0, 0, 0, ""),
721
Commands( "INSERT", 0, 0, 0, ""),
722
Commands( "INSERT_METHOD", 0, 0, 0, ""),
723
Commands( "INT", 0, 0, 0, ""),
724
Commands( "INT1", 0, 0, 0, ""),
725
Commands( "INT2", 0, 0, 0, ""),
726
Commands( "INT3", 0, 0, 0, ""),
727
Commands( "INT4", 0, 0, 0, ""),
728
Commands( "INT8", 0, 0, 0, ""),
729
Commands( "INTEGER", 0, 0, 0, ""),
730
Commands( "INTERVAL", 0, 0, 0, ""),
731
Commands( "INTO", 0, 0, 0, ""),
732
Commands( "IO_THREAD", 0, 0, 0, ""),
733
Commands( "IS", 0, 0, 0, ""),
734
Commands( "ISOLATION", 0, 0, 0, ""),
735
Commands( "ISSUER", 0, 0, 0, ""),
736
Commands( "ITERATE", 0, 0, 0, ""),
737
Commands( "INVOKER", 0, 0, 0, ""),
738
Commands( "JOIN", 0, 0, 0, ""),
739
Commands( "KEY", 0, 0, 0, ""),
740
Commands( "KEYS", 0, 0, 0, ""),
741
Commands( "KILL", 0, 0, 0, ""),
742
Commands( "LANGUAGE", 0, 0, 0, ""),
743
Commands( "LAST", 0, 0, 0, ""),
744
Commands( "LEADING", 0, 0, 0, ""),
745
Commands( "LEAVE", 0, 0, 0, ""),
746
Commands( "LEAVES", 0, 0, 0, ""),
747
Commands( "LEFT", 0, 0, 0, ""),
748
Commands( "LEVEL", 0, 0, 0, ""),
749
Commands( "LIKE", 0, 0, 0, ""),
750
Commands( "LIMIT", 0, 0, 0, ""),
751
Commands( "LINES", 0, 0, 0, ""),
752
Commands( "LINESTRING", 0, 0, 0, ""),
753
Commands( "LOAD", 0, 0, 0, ""),
754
Commands( "LOCAL", 0, 0, 0, ""),
755
Commands( "LOCALTIMESTAMP", 0, 0, 0, ""),
756
Commands( "LOCK", 0, 0, 0, ""),
757
Commands( "LOCKS", 0, 0, 0, ""),
758
Commands( "LOGS", 0, 0, 0, ""),
759
Commands( "LONG", 0, 0, 0, ""),
760
Commands( "LOOP", 0, 0, 0, ""),
761
Commands( "MATCH", 0, 0, 0, ""),
762
Commands( "MAX_CONNECTIONS_PER_HOUR", 0, 0, 0, ""),
763
Commands( "MAX_QUERIES_PER_HOUR", 0, 0, 0, ""),
764
Commands( "MAX_ROWS", 0, 0, 0, ""),
765
Commands( "MAX_UPDATES_PER_HOUR", 0, 0, 0, ""),
766
Commands( "MAX_USER_CONNECTIONS", 0, 0, 0, ""),
767
Commands( "MEDIUM", 0, 0, 0, ""),
768
Commands( "MERGE", 0, 0, 0, ""),
769
Commands( "MICROSECOND", 0, 0, 0, ""),
770
Commands( "MIGRATE", 0, 0, 0, ""),
771
Commands( "MINUTE", 0, 0, 0, ""),
772
Commands( "MINUTE_MICROSECOND", 0, 0, 0, ""),
773
Commands( "MINUTE_SECOND", 0, 0, 0, ""),
774
Commands( "MIN_ROWS", 0, 0, 0, ""),
775
Commands( "MOD", 0, 0, 0, ""),
776
Commands( "MODE", 0, 0, 0, ""),
777
Commands( "MODIFIES", 0, 0, 0, ""),
778
Commands( "MODIFY", 0, 0, 0, ""),
779
Commands( "MONTH", 0, 0, 0, ""),
780
Commands( "MULTILINESTRING", 0, 0, 0, ""),
781
Commands( "MULTIPOINT", 0, 0, 0, ""),
782
Commands( "MULTIPOLYGON", 0, 0, 0, ""),
783
Commands( "MUTEX", 0, 0, 0, ""),
784
Commands( "NAME", 0, 0, 0, ""),
785
Commands( "NAMES", 0, 0, 0, ""),
786
Commands( "NATIONAL", 0, 0, 0, ""),
787
Commands( "NATURAL", 0, 0, 0, ""),
788
Commands( "NCHAR", 0, 0, 0, ""),
789
Commands( "NEW", 0, 0, 0, ""),
790
Commands( "NEXT", 0, 0, 0, ""),
791
Commands( "NO", 0, 0, 0, ""),
792
Commands( "NONE", 0, 0, 0, ""),
793
Commands( "NOT", 0, 0, 0, ""),
794
Commands( "NULL", 0, 0, 0, ""),
795
Commands( "NUMERIC", 0, 0, 0, ""),
796
Commands( "NVARCHAR", 0, 0, 0, ""),
797
Commands( "OFFSET", 0, 0, 0, ""),
798
Commands( "ON", 0, 0, 0, ""),
799
Commands( "ONE", 0, 0, 0, ""),
800
Commands( "ONE_SHOT", 0, 0, 0, ""),
801
Commands( "OPEN", 0, 0, 0, ""),
802
Commands( "OPTIMIZE", 0, 0, 0, ""),
803
Commands( "OPTION", 0, 0, 0, ""),
804
Commands( "OPTIONALLY", 0, 0, 0, ""),
805
Commands( "OR", 0, 0, 0, ""),
806
Commands( "ORDER", 0, 0, 0, ""),
807
Commands( "OUT", 0, 0, 0, ""),
808
Commands( "OUTER", 0, 0, 0, ""),
809
Commands( "OUTFILE", 0, 0, 0, ""),
810
Commands( "PACK_KEYS", 0, 0, 0, ""),
811
Commands( "PARTIAL", 0, 0, 0, ""),
812
Commands( "PASSWORD", 0, 0, 0, ""),
813
Commands( "PHASE", 0, 0, 0, ""),
814
Commands( "PRECISION", 0, 0, 0, ""),
815
Commands( "PREPARE", 0, 0, 0, ""),
816
Commands( "PREV", 0, 0, 0, ""),
817
Commands( "PRIMARY", 0, 0, 0, ""),
818
Commands( "PRIVILEGES", 0, 0, 0, ""),
819
Commands( "PROCEDURE", 0, 0, 0, ""),
820
Commands( "PROCESS", 0, 0, 0, ""),
821
Commands( "PROCESSLIST", 0, 0, 0, ""),
822
Commands( "PURGE", 0, 0, 0, ""),
823
Commands( "QUARTER", 0, 0, 0, ""),
824
Commands( "QUERY", 0, 0, 0, ""),
825
Commands( "QUICK", 0, 0, 0, ""),
826
Commands( "READ", 0, 0, 0, ""),
827
Commands( "READS", 0, 0, 0, ""),
828
Commands( "REAL", 0, 0, 0, ""),
829
Commands( "RECOVER", 0, 0, 0, ""),
830
Commands( "REDUNDANT", 0, 0, 0, ""),
831
Commands( "REFERENCES", 0, 0, 0, ""),
832
Commands( "REGEXP", 0, 0, 0, ""),
833
Commands( "RELEASE", 0, 0, 0, ""),
834
Commands( "RELOAD", 0, 0, 0, ""),
835
Commands( "RENAME", 0, 0, 0, ""),
836
Commands( "REPAIR", 0, 0, 0, ""),
837
Commands( "REPEATABLE", 0, 0, 0, ""),
838
Commands( "REPLACE", 0, 0, 0, ""),
839
Commands( "REPEAT", 0, 0, 0, ""),
840
Commands( "REQUIRE", 0, 0, 0, ""),
841
Commands( "RESET", 0, 0, 0, ""),
842
Commands( "RESTORE", 0, 0, 0, ""),
843
Commands( "RESTRICT", 0, 0, 0, ""),
844
Commands( "RESUME", 0, 0, 0, ""),
845
Commands( "RETURN", 0, 0, 0, ""),
846
Commands( "RETURNS", 0, 0, 0, ""),
847
Commands( "REVOKE", 0, 0, 0, ""),
848
Commands( "RIGHT", 0, 0, 0, ""),
849
Commands( "RLIKE", 0, 0, 0, ""),
850
Commands( "ROLLBACK", 0, 0, 0, ""),
851
Commands( "ROLLUP", 0, 0, 0, ""),
852
Commands( "ROUTINE", 0, 0, 0, ""),
853
Commands( "ROW", 0, 0, 0, ""),
854
Commands( "ROWS", 0, 0, 0, ""),
855
Commands( "ROW_FORMAT", 0, 0, 0, ""),
856
Commands( "RTREE", 0, 0, 0, ""),
857
Commands( "SAVEPOINT", 0, 0, 0, ""),
858
Commands( "SCHEMA", 0, 0, 0, ""),
859
Commands( "SCHEMAS", 0, 0, 0, ""),
860
Commands( "SECOND", 0, 0, 0, ""),
861
Commands( "SECOND_MICROSECOND", 0, 0, 0, ""),
862
Commands( "SECURITY", 0, 0, 0, ""),
863
Commands( "SELECT", 0, 0, 0, ""),
864
Commands( "SENSITIVE", 0, 0, 0, ""),
865
Commands( "SEPARATOR", 0, 0, 0, ""),
866
Commands( "SERIAL", 0, 0, 0, ""),
867
Commands( "SERIALIZABLE", 0, 0, 0, ""),
868
Commands( "SESSION", 0, 0, 0, ""),
869
Commands( "SET", 0, 0, 0, ""),
870
Commands( "SHARE", 0, 0, 0, ""),
871
Commands( "SHOW", 0, 0, 0, ""),
872
Commands( "SHUTDOWN", 0, 0, 0, ""),
873
Commands( "SIGNED", 0, 0, 0, ""),
874
Commands( "SIMPLE", 0, 0, 0, ""),
875
Commands( "SLAVE", 0, 0, 0, ""),
876
Commands( "SNAPSHOT", 0, 0, 0, ""),
877
Commands( "SOME", 0, 0, 0, ""),
878
Commands( "SONAME", 0, 0, 0, ""),
879
Commands( "SOUNDS", 0, 0, 0, ""),
880
Commands( "SPATIAL", 0, 0, 0, ""),
881
Commands( "SPECIFIC", 0, 0, 0, ""),
882
Commands( "SQL", 0, 0, 0, ""),
883
Commands( "SQLEXCEPTION", 0, 0, 0, ""),
884
Commands( "SQLSTATE", 0, 0, 0, ""),
885
Commands( "SQLWARNING", 0, 0, 0, ""),
886
Commands( "SQL_BIG_RESULT", 0, 0, 0, ""),
887
Commands( "SQL_BUFFER_RESULT", 0, 0, 0, ""),
888
Commands( "SQL_CACHE", 0, 0, 0, ""),
889
Commands( "SQL_CALC_FOUND_ROWS", 0, 0, 0, ""),
890
Commands( "SQL_NO_CACHE", 0, 0, 0, ""),
891
Commands( "SQL_SMALL_RESULT", 0, 0, 0, ""),
892
Commands( "SQL_THREAD", 0, 0, 0, ""),
893
Commands( "SQL_TSI_FRAC_SECOND", 0, 0, 0, ""),
894
Commands( "SQL_TSI_SECOND", 0, 0, 0, ""),
895
Commands( "SQL_TSI_MINUTE", 0, 0, 0, ""),
896
Commands( "SQL_TSI_HOUR", 0, 0, 0, ""),
897
Commands( "SQL_TSI_DAY", 0, 0, 0, ""),
898
Commands( "SQL_TSI_WEEK", 0, 0, 0, ""),
899
Commands( "SQL_TSI_MONTH", 0, 0, 0, ""),
900
Commands( "SQL_TSI_QUARTER", 0, 0, 0, ""),
901
Commands( "SQL_TSI_YEAR", 0, 0, 0, ""),
902
Commands( "SSL", 0, 0, 0, ""),
903
Commands( "START", 0, 0, 0, ""),
904
Commands( "STARTING", 0, 0, 0, ""),
905
Commands( "STATUS", 0, 0, 0, ""),
906
Commands( "STOP", 0, 0, 0, ""),
907
Commands( "STORAGE", 0, 0, 0, ""),
908
Commands( "STRAIGHT_JOIN", 0, 0, 0, ""),
909
Commands( "STRING", 0, 0, 0, ""),
910
Commands( "STRIPED", 0, 0, 0, ""),
911
Commands( "SUBJECT", 0, 0, 0, ""),
912
Commands( "SUPER", 0, 0, 0, ""),
913
Commands( "SUSPEND", 0, 0, 0, ""),
914
Commands( "TABLE", 0, 0, 0, ""),
915
Commands( "TABLES", 0, 0, 0, ""),
916
Commands( "TABLESPACE", 0, 0, 0, ""),
917
Commands( "TEMPORARY", 0, 0, 0, ""),
918
Commands( "TEMPTABLE", 0, 0, 0, ""),
919
Commands( "TERMINATED", 0, 0, 0, ""),
920
Commands( "TEXT", 0, 0, 0, ""),
921
Commands( "THEN", 0, 0, 0, ""),
922
Commands( "TIMESTAMP", 0, 0, 0, ""),
923
Commands( "TIMESTAMPADD", 0, 0, 0, ""),
924
Commands( "TIMESTAMPDIFF", 0, 0, 0, ""),
925
Commands( "TO", 0, 0, 0, ""),
926
Commands( "TRAILING", 0, 0, 0, ""),
927
Commands( "TRANSACTION", 0, 0, 0, ""),
928
Commands( "TRUE", 0, 0, 0, ""),
929
Commands( "TRUNCATE", 0, 0, 0, ""),
930
Commands( "TYPE", 0, 0, 0, ""),
931
Commands( "TYPES", 0, 0, 0, ""),
932
Commands( "UNCOMMITTED", 0, 0, 0, ""),
933
Commands( "UNDEFINED", 0, 0, 0, ""),
934
Commands( "UNDO", 0, 0, 0, ""),
935
Commands( "UNICODE", 0, 0, 0, ""),
936
Commands( "UNION", 0, 0, 0, ""),
937
Commands( "UNIQUE", 0, 0, 0, ""),
938
Commands( "UNKNOWN", 0, 0, 0, ""),
939
Commands( "UNLOCK", 0, 0, 0, ""),
940
Commands( "UNTIL", 0, 0, 0, ""),
941
Commands( "UPDATE", 0, 0, 0, ""),
942
Commands( "UPGRADE", 0, 0, 0, ""),
943
Commands( "USAGE", 0, 0, 0, ""),
944
Commands( "USE", 0, 0, 0, ""),
945
Commands( "USER", 0, 0, 0, ""),
946
Commands( "USER_RESOURCES", 0, 0, 0, ""),
947
Commands( "USING", 0, 0, 0, ""),
948
Commands( "UTC_DATE", 0, 0, 0, ""),
949
Commands( "UTC_TIMESTAMP", 0, 0, 0, ""),
950
Commands( "VALUE", 0, 0, 0, ""),
951
Commands( "VALUES", 0, 0, 0, ""),
952
Commands( "VARBINARY", 0, 0, 0, ""),
953
Commands( "VARCHAR", 0, 0, 0, ""),
954
Commands( "VARCHARACTER", 0, 0, 0, ""),
955
Commands( "VARIABLES", 0, 0, 0, ""),
956
Commands( "VARYING", 0, 0, 0, ""),
957
Commands( "WARNINGS", 0, 0, 0, ""),
958
Commands( "WEEK", 0, 0, 0, ""),
959
Commands( "WHEN", 0, 0, 0, ""),
960
Commands( "WHERE", 0, 0, 0, ""),
961
Commands( "WHILE", 0, 0, 0, ""),
962
Commands( "VIEW", 0, 0, 0, ""),
963
Commands( "WITH", 0, 0, 0, ""),
964
Commands( "WORK", 0, 0, 0, ""),
965
Commands( "WRITE", 0, 0, 0, ""),
966
Commands( "XOR", 0, 0, 0, ""),
967
Commands( "XA", 0, 0, 0, ""),
968
Commands( "YEAR", 0, 0, 0, ""),
969
Commands( "YEAR_MONTH", 0, 0, 0, ""),
970
Commands( "ZEROFILL", 0, 0, 0, ""),
971
Commands( "ABS", 0, 0, 0, ""),
972
Commands( "ACOS", 0, 0, 0, ""),
973
Commands( "ADDDATE", 0, 0, 0, ""),
974
Commands( "AREA", 0, 0, 0, ""),
975
Commands( "ASIN", 0, 0, 0, ""),
976
Commands( "ASBINARY", 0, 0, 0, ""),
977
Commands( "ASTEXT", 0, 0, 0, ""),
978
Commands( "ATAN", 0, 0, 0, ""),
979
Commands( "ATAN2", 0, 0, 0, ""),
980
Commands( "BENCHMARK", 0, 0, 0, ""),
981
Commands( "BIN", 0, 0, 0, ""),
982
Commands( "BIT_OR", 0, 0, 0, ""),
983
Commands( "BIT_AND", 0, 0, 0, ""),
984
Commands( "BIT_XOR", 0, 0, 0, ""),
985
Commands( "CAST", 0, 0, 0, ""),
986
Commands( "CEIL", 0, 0, 0, ""),
987
Commands( "CEILING", 0, 0, 0, ""),
988
Commands( "CENTROID", 0, 0, 0, ""),
989
Commands( "CHAR_LENGTH", 0, 0, 0, ""),
990
Commands( "CHARACTER_LENGTH", 0, 0, 0, ""),
991
Commands( "COALESCE", 0, 0, 0, ""),
992
Commands( "COERCIBILITY", 0, 0, 0, ""),
993
Commands( "COMPRESS", 0, 0, 0, ""),
994
Commands( "CONCAT", 0, 0, 0, ""),
995
Commands( "CONCAT_WS", 0, 0, 0, ""),
996
Commands( "CONNECTION_ID", 0, 0, 0, ""),
997
Commands( "CONV", 0, 0, 0, ""),
998
Commands( "CONVERT_TZ", 0, 0, 0, ""),
999
Commands( "COUNT", 0, 0, 0, ""),
1000
Commands( "COS", 0, 0, 0, ""),
1001
Commands( "COT", 0, 0, 0, ""),
1002
Commands( "CRC32", 0, 0, 0, ""),
1003
Commands( "CROSSES", 0, 0, 0, ""),
1004
Commands( "CURDATE", 0, 0, 0, ""),
1005
Commands( "DATE_ADD", 0, 0, 0, ""),
1006
Commands( "DATEDIFF", 0, 0, 0, ""),
1007
Commands( "DATE_FORMAT", 0, 0, 0, ""),
1008
Commands( "DATE_SUB", 0, 0, 0, ""),
1009
Commands( "DAYNAME", 0, 0, 0, ""),
1010
Commands( "DAYOFMONTH", 0, 0, 0, ""),
1011
Commands( "DAYOFWEEK", 0, 0, 0, ""),
1012
Commands( "DAYOFYEAR", 0, 0, 0, ""),
1013
Commands( "DECODE", 0, 0, 0, ""),
1014
Commands( "DEGREES", 0, 0, 0, ""),
1015
Commands( "DES_ENCRYPT", 0, 0, 0, ""),
1016
Commands( "DES_DECRYPT", 0, 0, 0, ""),
1017
Commands( "DIMENSION", 0, 0, 0, ""),
1018
Commands( "DISJOINT", 0, 0, 0, ""),
1019
Commands( "ELT", 0, 0, 0, ""),
1020
Commands( "ENCODE", 0, 0, 0, ""),
1021
Commands( "ENCRYPT", 0, 0, 0, ""),
1022
Commands( "ENDPOINT", 0, 0, 0, ""),
1023
Commands( "ENVELOPE", 0, 0, 0, ""),
1024
Commands( "EQUALS", 0, 0, 0, ""),
1025
Commands( "EXTERIORRING", 0, 0, 0, ""),
1026
Commands( "EXTRACT", 0, 0, 0, ""),
1027
Commands( "EXP", 0, 0, 0, ""),
1028
Commands( "EXPORT_SET", 0, 0, 0, ""),
1029
Commands( "FIELD", 0, 0, 0, ""),
1030
Commands( "FIND_IN_SET", 0, 0, 0, ""),
1031
Commands( "FLOOR", 0, 0, 0, ""),
1032
Commands( "FORMAT", 0, 0, 0, ""),
1033
Commands( "FOUND_ROWS", 0, 0, 0, ""),
1034
Commands( "FROM_DAYS", 0, 0, 0, ""),
1035
Commands( "FROM_UNIXTIME", 0, 0, 0, ""),
1036
Commands( "GET_LOCK", 0, 0, 0, ""),
1037
Commands( "GLENGTH", 0, 0, 0, ""),
1038
Commands( "GREATEST", 0, 0, 0, ""),
1039
Commands( "GROUP_CONCAT", 0, 0, 0, ""),
1040
Commands( "GROUP_UNIQUE_USERS", 0, 0, 0, ""),
1041
Commands( "HEX", 0, 0, 0, ""),
1042
Commands( "IFNULL", 0, 0, 0, ""),
1043
Commands( "INSTR", 0, 0, 0, ""),
1044
Commands( "INTERIORRINGN", 0, 0, 0, ""),
1045
Commands( "INTERSECTS", 0, 0, 0, ""),
1046
Commands( "ISCLOSED", 0, 0, 0, ""),
1047
Commands( "ISEMPTY", 0, 0, 0, ""),
1048
Commands( "ISNULL", 0, 0, 0, ""),
1049
Commands( "IS_FREE_LOCK", 0, 0, 0, ""),
1050
Commands( "IS_USED_LOCK", 0, 0, 0, ""),
1051
Commands( "LAST_INSERT_ID", 0, 0, 0, ""),
1052
Commands( "ISSIMPLE", 0, 0, 0, ""),
1053
Commands( "LAST_DAY", 0, 0, 0, ""),
1054
Commands( "LCASE", 0, 0, 0, ""),
1055
Commands( "LEAST", 0, 0, 0, ""),
1056
Commands( "LENGTH", 0, 0, 0, ""),
1057
Commands( "LN", 0, 0, 0, ""),
1058
Commands( "LOAD_FILE", 0, 0, 0, ""),
1059
Commands( "LOCATE", 0, 0, 0, ""),
1060
Commands( "LOG", 0, 0, 0, ""),
1061
Commands( "LOG2", 0, 0, 0, ""),
1062
Commands( "LOG10", 0, 0, 0, ""),
1063
Commands( "LOWER", 0, 0, 0, ""),
1064
Commands( "LPAD", 0, 0, 0, ""),
1065
Commands( "LTRIM", 0, 0, 0, ""),
1066
Commands( "MAKE_SET", 0, 0, 0, ""),
1067
Commands( "MAKEDATE", 0, 0, 0, ""),
1068
Commands( "MASTER_POS_WAIT", 0, 0, 0, ""),
1069
Commands( "MAX", 0, 0, 0, ""),
1070
Commands( "MBRCONTAINS", 0, 0, 0, ""),
1071
Commands( "MBRDISJOINT", 0, 0, 0, ""),
1072
Commands( "MBREQUAL", 0, 0, 0, ""),
1073
Commands( "MBRINTERSECTS", 0, 0, 0, ""),
1074
Commands( "MBROVERLAPS", 0, 0, 0, ""),
1075
Commands( "MBRTOUCHES", 0, 0, 0, ""),
1076
Commands( "MBRWITHIN", 0, 0, 0, ""),
1077
Commands( "MD5", 0, 0, 0, ""),
1078
Commands( "MID", 0, 0, 0, ""),
1079
Commands( "MIN", 0, 0, 0, ""),
1080
Commands( "MONTHNAME", 0, 0, 0, ""),
1081
Commands( "NAME_CONST", 0, 0, 0, ""),
1082
Commands( "NOW", 0, 0, 0, ""),
1083
Commands( "NULLIF", 0, 0, 0, ""),
1084
Commands( "NUMPOINTS", 0, 0, 0, ""),
1085
Commands( "OCTET_LENGTH", 0, 0, 0, ""),
1086
Commands( "OCT", 0, 0, 0, ""),
1087
Commands( "ORD", 0, 0, 0, ""),
1088
Commands( "OVERLAPS", 0, 0, 0, ""),
1089
Commands( "PERIOD_ADD", 0, 0, 0, ""),
1090
Commands( "PERIOD_DIFF", 0, 0, 0, ""),
1091
Commands( "PI", 0, 0, 0, ""),
1092
Commands( "POINTN", 0, 0, 0, ""),
1093
Commands( "POSITION", 0, 0, 0, ""),
1094
Commands( "POW", 0, 0, 0, ""),
1095
Commands( "POWER", 0, 0, 0, ""),
1096
Commands( "QUOTE", 0, 0, 0, ""),
1097
Commands( "RADIANS", 0, 0, 0, ""),
1098
Commands( "RAND", 0, 0, 0, ""),
1099
Commands( "RELEASE_LOCK", 0, 0, 0, ""),
1100
Commands( "REVERSE", 0, 0, 0, ""),
1101
Commands( "ROUND", 0, 0, 0, ""),
1102
Commands( "ROW_COUNT", 0, 0, 0, ""),
1103
Commands( "RPAD", 0, 0, 0, ""),
1104
Commands( "RTRIM", 0, 0, 0, ""),
1105
Commands( "SESSION_USER", 0, 0, 0, ""),
1106
Commands( "SUBDATE", 0, 0, 0, ""),
1107
Commands( "SIGN", 0, 0, 0, ""),
1108
Commands( "SIN", 0, 0, 0, ""),
1109
Commands( "SHA", 0, 0, 0, ""),
1110
Commands( "SHA1", 0, 0, 0, ""),
1111
Commands( "SLEEP", 0, 0, 0, ""),
1112
Commands( "SOUNDEX", 0, 0, 0, ""),
1113
Commands( "SPACE", 0, 0, 0, ""),
1114
Commands( "SQRT", 0, 0, 0, ""),
1115
Commands( "SRID", 0, 0, 0, ""),
1116
Commands( "STARTPOINT", 0, 0, 0, ""),
1117
Commands( "STD", 0, 0, 0, ""),
1118
Commands( "STDDEV", 0, 0, 0, ""),
1119
Commands( "STDDEV_POP", 0, 0, 0, ""),
1120
Commands( "STDDEV_SAMP", 0, 0, 0, ""),
1121
Commands( "STR_TO_DATE", 0, 0, 0, ""),
1122
Commands( "STRCMP", 0, 0, 0, ""),
1123
Commands( "SUBSTR", 0, 0, 0, ""),
1124
Commands( "SUBSTRING", 0, 0, 0, ""),
1125
Commands( "SUBSTRING_INDEX", 0, 0, 0, ""),
1126
Commands( "SUM", 0, 0, 0, ""),
1127
Commands( "SYSDATE", 0, 0, 0, ""),
1128
Commands( "SYSTEM_USER", 0, 0, 0, ""),
1129
Commands( "TAN", 0, 0, 0, ""),
1130
Commands( "TIME_FORMAT", 0, 0, 0, ""),
1131
Commands( "TO_DAYS", 0, 0, 0, ""),
1132
Commands( "TOUCHES", 0, 0, 0, ""),
1133
Commands( "TRIM", 0, 0, 0, ""),
1134
Commands( "UCASE", 0, 0, 0, ""),
1135
Commands( "UNCOMPRESS", 0, 0, 0, ""),
1136
Commands( "UNCOMPRESSED_LENGTH", 0, 0, 0, ""),
1137
Commands( "UNHEX", 0, 0, 0, ""),
1138
Commands( "UNIQUE_USERS", 0, 0, 0, ""),
1139
Commands( "UNIX_TIMESTAMP", 0, 0, 0, ""),
1140
Commands( "UPPER", 0, 0, 0, ""),
1141
Commands( "UUID", 0, 0, 0, ""),
1142
Commands( "VARIANCE", 0, 0, 0, ""),
1143
Commands( "VAR_POP", 0, 0, 0, ""),
1144
Commands( "VAR_SAMP", 0, 0, 0, ""),
1145
Commands( "VERSION", 0, 0, 0, ""),
1146
Commands( "WEEKDAY", 0, 0, 0, ""),
1147
Commands( "WEEKOFYEAR", 0, 0, 0, ""),
1148
Commands( "WITHIN", 0, 0, 0, ""),
1149
Commands( "X", 0, 0, 0, ""),
1150
Commands( "Y", 0, 0, 0, ""),
1151
Commands( "YEARWEEK", 0, 0, 0, ""),
299
{ "ACTION", 0, 0, 0, ""},
300
{ "ADD", 0, 0, 0, ""},
301
{ "AFTER", 0, 0, 0, ""},
302
{ "AGAINST", 0, 0, 0, ""},
303
{ "AGGREGATE", 0, 0, 0, ""},
304
{ "ALL", 0, 0, 0, ""},
305
{ "ALGORITHM", 0, 0, 0, ""},
306
{ "ALTER", 0, 0, 0, ""},
307
{ "ANALYZE", 0, 0, 0, ""},
308
{ "AND", 0, 0, 0, ""},
309
{ "ANY", 0, 0, 0, ""},
310
{ "AS", 0, 0, 0, ""},
311
{ "ASC", 0, 0, 0, ""},
312
{ "ASCII", 0, 0, 0, ""},
313
{ "ASENSITIVE", 0, 0, 0, ""},
314
{ "AUTO_INCREMENT", 0, 0, 0, ""},
315
{ "AVG", 0, 0, 0, ""},
316
{ "AVG_ROW_LENGTH", 0, 0, 0, ""},
317
{ "BACKUP", 0, 0, 0, ""},
318
{ "BDB", 0, 0, 0, ""},
319
{ "BEFORE", 0, 0, 0, ""},
320
{ "BEGIN", 0, 0, 0, ""},
321
{ "BERKELEYDB", 0, 0, 0, ""},
322
{ "BETWEEN", 0, 0, 0, ""},
323
{ "BIGINT", 0, 0, 0, ""},
324
{ "BINARY", 0, 0, 0, ""},
325
{ "BINLOG", 0, 0, 0, ""},
326
{ "BIT", 0, 0, 0, ""},
327
{ "BLOB", 0, 0, 0, ""},
328
{ "BOOL", 0, 0, 0, ""},
329
{ "BOOLEAN", 0, 0, 0, ""},
330
{ "BOTH", 0, 0, 0, ""},
331
{ "BTREE", 0, 0, 0, ""},
332
{ "BY", 0, 0, 0, ""},
333
{ "BYTE", 0, 0, 0, ""},
334
{ "CACHE", 0, 0, 0, ""},
335
{ "CALL", 0, 0, 0, ""},
336
{ "CASCADE", 0, 0, 0, ""},
337
{ "CASCADED", 0, 0, 0, ""},
338
{ "CASE", 0, 0, 0, ""},
339
{ "CHAIN", 0, 0, 0, ""},
340
{ "CHANGE", 0, 0, 0, ""},
341
{ "CHANGED", 0, 0, 0, ""},
342
{ "CHAR", 0, 0, 0, ""},
343
{ "CHARACTER", 0, 0, 0, ""},
344
{ "CHARSET", 0, 0, 0, ""},
345
{ "CHECK", 0, 0, 0, ""},
346
{ "CHECKSUM", 0, 0, 0, ""},
347
{ "CIPHER", 0, 0, 0, ""},
348
{ "CLIENT", 0, 0, 0, ""},
349
{ "CLOSE", 0, 0, 0, ""},
350
{ "CODE", 0, 0, 0, ""},
351
{ "COLLATE", 0, 0, 0, ""},
352
{ "COLLATION", 0, 0, 0, ""},
353
{ "COLUMN", 0, 0, 0, ""},
354
{ "COLUMNS", 0, 0, 0, ""},
355
{ "COMMENT", 0, 0, 0, ""},
356
{ "COMMIT", 0, 0, 0, ""},
357
{ "COMMITTED", 0, 0, 0, ""},
358
{ "COMPACT", 0, 0, 0, ""},
359
{ "COMPRESSED", 0, 0, 0, ""},
360
{ "CONCURRENT", 0, 0, 0, ""},
361
{ "CONDITION", 0, 0, 0, ""},
362
{ "CONNECTION", 0, 0, 0, ""},
363
{ "CONSISTENT", 0, 0, 0, ""},
364
{ "CONSTRAINT", 0, 0, 0, ""},
365
{ "CONTAINS", 0, 0, 0, ""},
366
{ "CONTINUE", 0, 0, 0, ""},
367
{ "CONVERT", 0, 0, 0, ""},
368
{ "CREATE", 0, 0, 0, ""},
369
{ "CROSS", 0, 0, 0, ""},
370
{ "CUBE", 0, 0, 0, ""},
371
{ "CURRENT_DATE", 0, 0, 0, ""},
372
{ "CURRENT_TIME", 0, 0, 0, ""},
373
{ "CURRENT_TIMESTAMP", 0, 0, 0, ""},
374
{ "CURRENT_USER", 0, 0, 0, ""},
375
{ "CURSOR", 0, 0, 0, ""},
376
{ "DATA", 0, 0, 0, ""},
377
{ "DATABASE", 0, 0, 0, ""},
378
{ "DATABASES", 0, 0, 0, ""},
379
{ "DATE", 0, 0, 0, ""},
380
{ "DATETIME", 0, 0, 0, ""},
381
{ "DAY", 0, 0, 0, ""},
382
{ "DAY_HOUR", 0, 0, 0, ""},
383
{ "DAY_MICROSECOND", 0, 0, 0, ""},
384
{ "DAY_MINUTE", 0, 0, 0, ""},
385
{ "DAY_SECOND", 0, 0, 0, ""},
386
{ "DEALLOCATE", 0, 0, 0, ""},
387
{ "DEC", 0, 0, 0, ""},
388
{ "DECIMAL", 0, 0, 0, ""},
389
{ "DECLARE", 0, 0, 0, ""},
390
{ "DEFAULT", 0, 0, 0, ""},
391
{ "DEFINER", 0, 0, 0, ""},
392
{ "DELAYED", 0, 0, 0, ""},
393
{ "DELAY_KEY_WRITE", 0, 0, 0, ""},
394
{ "DELETE", 0, 0, 0, ""},
395
{ "DESC", 0, 0, 0, ""},
396
{ "DESCRIBE", 0, 0, 0, ""},
397
{ "DES_KEY_FILE", 0, 0, 0, ""},
398
{ "DETERMINISTIC", 0, 0, 0, ""},
399
{ "DIRECTORY", 0, 0, 0, ""},
400
{ "DISABLE", 0, 0, 0, ""},
401
{ "DISCARD", 0, 0, 0, ""},
402
{ "DISTINCT", 0, 0, 0, ""},
403
{ "DISTINCTROW", 0, 0, 0, ""},
404
{ "DIV", 0, 0, 0, ""},
405
{ "DO", 0, 0, 0, ""},
406
{ "DOUBLE", 0, 0, 0, ""},
407
{ "DROP", 0, 0, 0, ""},
408
{ "DUAL", 0, 0, 0, ""},
409
{ "DUMPFILE", 0, 0, 0, ""},
410
{ "DUPLICATE", 0, 0, 0, ""},
411
{ "DYNAMIC", 0, 0, 0, ""},
412
{ "EACH", 0, 0, 0, ""},
413
{ "ELSE", 0, 0, 0, ""},
414
{ "ELSEIF", 0, 0, 0, ""},
415
{ "ENABLE", 0, 0, 0, ""},
416
{ "ENCLOSED", 0, 0, 0, ""},
417
{ "END", 0, 0, 0, ""},
418
{ "ENGINE", 0, 0, 0, ""},
419
{ "ENGINES", 0, 0, 0, ""},
420
{ "ENUM", 0, 0, 0, ""},
421
{ "ERRORS", 0, 0, 0, ""},
422
{ "ESCAPE", 0, 0, 0, ""},
423
{ "ESCAPED", 0, 0, 0, ""},
424
{ "EVENTS", 0, 0, 0, ""},
425
{ "EXECUTE", 0, 0, 0, ""},
426
{ "EXISTS", 0, 0, 0, ""},
427
{ "EXIT", 0, 0, 0, ""},
428
{ "EXPANSION", 0, 0, 0, ""},
429
{ "EXPLAIN", 0, 0, 0, ""},
430
{ "EXTENDED", 0, 0, 0, ""},
431
{ "FALSE", 0, 0, 0, ""},
432
{ "FAST", 0, 0, 0, ""},
433
{ "FETCH", 0, 0, 0, ""},
434
{ "FIELDS", 0, 0, 0, ""},
435
{ "FILE", 0, 0, 0, ""},
436
{ "FIRST", 0, 0, 0, ""},
437
{ "FIXED", 0, 0, 0, ""},
438
{ "FLOAT", 0, 0, 0, ""},
439
{ "FLOAT4", 0, 0, 0, ""},
440
{ "FLOAT8", 0, 0, 0, ""},
441
{ "FLUSH", 0, 0, 0, ""},
442
{ "FOR", 0, 0, 0, ""},
443
{ "FORCE", 0, 0, 0, ""},
444
{ "FOREIGN", 0, 0, 0, ""},
445
{ "FOUND", 0, 0, 0, ""},
446
{ "FRAC_SECOND", 0, 0, 0, ""},
447
{ "FROM", 0, 0, 0, ""},
448
{ "FULL", 0, 0, 0, ""},
449
{ "FULLTEXT", 0, 0, 0, ""},
450
{ "FUNCTION", 0, 0, 0, ""},
451
{ "GET_FORMAT", 0, 0, 0, ""},
452
{ "GLOBAL", 0, 0, 0, ""},
453
{ "GRANT", 0, 0, 0, ""},
454
{ "GRANTS", 0, 0, 0, ""},
455
{ "GROUP", 0, 0, 0, ""},
456
{ "HANDLER", 0, 0, 0, ""},
457
{ "HASH", 0, 0, 0, ""},
458
{ "HAVING", 0, 0, 0, ""},
459
{ "HELP", 0, 0, 0, ""},
460
{ "HIGH_PRIORITY", 0, 0, 0, ""},
461
{ "HOSTS", 0, 0, 0, ""},
462
{ "HOUR", 0, 0, 0, ""},
463
{ "HOUR_MICROSECOND", 0, 0, 0, ""},
464
{ "HOUR_MINUTE", 0, 0, 0, ""},
465
{ "HOUR_SECOND", 0, 0, 0, ""},
466
{ "IDENTIFIED", 0, 0, 0, ""},
467
{ "IF", 0, 0, 0, ""},
468
{ "IGNORE", 0, 0, 0, ""},
469
{ "IMPORT", 0, 0, 0, ""},
470
{ "IN", 0, 0, 0, ""},
471
{ "INDEX", 0, 0, 0, ""},
472
{ "INDEXES", 0, 0, 0, ""},
473
{ "INFILE", 0, 0, 0, ""},
474
{ "INNER", 0, 0, 0, ""},
475
{ "INNOBASE", 0, 0, 0, ""},
476
{ "INNODB", 0, 0, 0, ""},
477
{ "INOUT", 0, 0, 0, ""},
478
{ "INSENSITIVE", 0, 0, 0, ""},
479
{ "INSERT", 0, 0, 0, ""},
480
{ "INSERT_METHOD", 0, 0, 0, ""},
481
{ "INT", 0, 0, 0, ""},
482
{ "INT1", 0, 0, 0, ""},
483
{ "INT2", 0, 0, 0, ""},
484
{ "INT3", 0, 0, 0, ""},
485
{ "INT4", 0, 0, 0, ""},
486
{ "INT8", 0, 0, 0, ""},
487
{ "INTEGER", 0, 0, 0, ""},
488
{ "INTERVAL", 0, 0, 0, ""},
489
{ "INTO", 0, 0, 0, ""},
490
{ "IO_THREAD", 0, 0, 0, ""},
491
{ "IS", 0, 0, 0, ""},
492
{ "ISOLATION", 0, 0, 0, ""},
493
{ "ISSUER", 0, 0, 0, ""},
494
{ "ITERATE", 0, 0, 0, ""},
495
{ "INVOKER", 0, 0, 0, ""},
496
{ "JOIN", 0, 0, 0, ""},
497
{ "KEY", 0, 0, 0, ""},
498
{ "KEYS", 0, 0, 0, ""},
499
{ "KILL", 0, 0, 0, ""},
500
{ "LANGUAGE", 0, 0, 0, ""},
501
{ "LAST", 0, 0, 0, ""},
502
{ "LEADING", 0, 0, 0, ""},
503
{ "LEAVE", 0, 0, 0, ""},
504
{ "LEAVES", 0, 0, 0, ""},
505
{ "LEFT", 0, 0, 0, ""},
506
{ "LEVEL", 0, 0, 0, ""},
507
{ "LIKE", 0, 0, 0, ""},
508
{ "LIMIT", 0, 0, 0, ""},
509
{ "LINES", 0, 0, 0, ""},
510
{ "LINESTRING", 0, 0, 0, ""},
511
{ "LOAD", 0, 0, 0, ""},
512
{ "LOCAL", 0, 0, 0, ""},
513
{ "LOCALTIME", 0, 0, 0, ""},
514
{ "LOCALTIMESTAMP", 0, 0, 0, ""},
515
{ "LOCK", 0, 0, 0, ""},
516
{ "LOCKS", 0, 0, 0, ""},
517
{ "LOGS", 0, 0, 0, ""},
518
{ "LONG", 0, 0, 0, ""},
519
{ "LONGTEXT", 0, 0, 0, ""},
520
{ "LOOP", 0, 0, 0, ""},
521
{ "LOW_PRIORITY", 0, 0, 0, ""},
522
{ "MASTER", 0, 0, 0, ""},
523
{ "MASTER_CONNECT_RETRY", 0, 0, 0, ""},
524
{ "MASTER_HOST", 0, 0, 0, ""},
525
{ "MASTER_LOG_FILE", 0, 0, 0, ""},
526
{ "MASTER_LOG_POS", 0, 0, 0, ""},
527
{ "MASTER_PASSWORD", 0, 0, 0, ""},
528
{ "MASTER_PORT", 0, 0, 0, ""},
529
{ "MASTER_SERVER_ID", 0, 0, 0, ""},
530
{ "MASTER_SSL", 0, 0, 0, ""},
531
{ "MASTER_SSL_CA", 0, 0, 0, ""},
532
{ "MASTER_SSL_CAPATH", 0, 0, 0, ""},
533
{ "MASTER_SSL_CERT", 0, 0, 0, ""},
534
{ "MASTER_SSL_CIPHER", 0, 0, 0, ""},
535
{ "MASTER_SSL_KEY", 0, 0, 0, ""},
536
{ "MASTER_USER", 0, 0, 0, ""},
537
{ "MATCH", 0, 0, 0, ""},
538
{ "MAX_CONNECTIONS_PER_HOUR", 0, 0, 0, ""},
539
{ "MAX_QUERIES_PER_HOUR", 0, 0, 0, ""},
540
{ "MAX_ROWS", 0, 0, 0, ""},
541
{ "MAX_UPDATES_PER_HOUR", 0, 0, 0, ""},
542
{ "MAX_USER_CONNECTIONS", 0, 0, 0, ""},
543
{ "MEDIUM", 0, 0, 0, ""},
544
{ "MEDIUMTEXT", 0, 0, 0, ""},
545
{ "MERGE", 0, 0, 0, ""},
546
{ "MICROSECOND", 0, 0, 0, ""},
547
{ "MIDDLEINT", 0, 0, 0, ""},
548
{ "MIGRATE", 0, 0, 0, ""},
549
{ "MINUTE", 0, 0, 0, ""},
550
{ "MINUTE_MICROSECOND", 0, 0, 0, ""},
551
{ "MINUTE_SECOND", 0, 0, 0, ""},
552
{ "MIN_ROWS", 0, 0, 0, ""},
553
{ "MOD", 0, 0, 0, ""},
554
{ "MODE", 0, 0, 0, ""},
555
{ "MODIFIES", 0, 0, 0, ""},
556
{ "MODIFY", 0, 0, 0, ""},
557
{ "MONTH", 0, 0, 0, ""},
558
{ "MULTILINESTRING", 0, 0, 0, ""},
559
{ "MULTIPOINT", 0, 0, 0, ""},
560
{ "MULTIPOLYGON", 0, 0, 0, ""},
561
{ "MUTEX", 0, 0, 0, ""},
562
{ "NAME", 0, 0, 0, ""},
563
{ "NAMES", 0, 0, 0, ""},
564
{ "NATIONAL", 0, 0, 0, ""},
565
{ "NATURAL", 0, 0, 0, ""},
566
{ "NDB", 0, 0, 0, ""},
567
{ "NDBCLUSTER", 0, 0, 0, ""},
568
{ "NCHAR", 0, 0, 0, ""},
569
{ "NEW", 0, 0, 0, ""},
570
{ "NEXT", 0, 0, 0, ""},
571
{ "NO", 0, 0, 0, ""},
572
{ "NONE", 0, 0, 0, ""},
573
{ "NOT", 0, 0, 0, ""},
574
{ "NO_WRITE_TO_BINLOG", 0, 0, 0, ""},
575
{ "NULL", 0, 0, 0, ""},
576
{ "NUMERIC", 0, 0, 0, ""},
577
{ "NVARCHAR", 0, 0, 0, ""},
578
{ "OFFSET", 0, 0, 0, ""},
579
{ "OLD_PASSWORD", 0, 0, 0, ""},
580
{ "ON", 0, 0, 0, ""},
581
{ "ONE", 0, 0, 0, ""},
582
{ "ONE_SHOT", 0, 0, 0, ""},
583
{ "OPEN", 0, 0, 0, ""},
584
{ "OPTIMIZE", 0, 0, 0, ""},
585
{ "OPTION", 0, 0, 0, ""},
586
{ "OPTIONALLY", 0, 0, 0, ""},
587
{ "OR", 0, 0, 0, ""},
588
{ "ORDER", 0, 0, 0, ""},
589
{ "OUT", 0, 0, 0, ""},
590
{ "OUTER", 0, 0, 0, ""},
591
{ "OUTFILE", 0, 0, 0, ""},
592
{ "PACK_KEYS", 0, 0, 0, ""},
593
{ "PARTIAL", 0, 0, 0, ""},
594
{ "PASSWORD", 0, 0, 0, ""},
595
{ "PHASE", 0, 0, 0, ""},
596
{ "POINT", 0, 0, 0, ""},
597
{ "POLYGON", 0, 0, 0, ""},
598
{ "PRECISION", 0, 0, 0, ""},
599
{ "PREPARE", 0, 0, 0, ""},
600
{ "PREV", 0, 0, 0, ""},
601
{ "PRIMARY", 0, 0, 0, ""},
602
{ "PRIVILEGES", 0, 0, 0, ""},
603
{ "PROCEDURE", 0, 0, 0, ""},
604
{ "PROCESS", 0, 0, 0, ""},
605
{ "PROCESSLIST", 0, 0, 0, ""},
606
{ "PURGE", 0, 0, 0, ""},
607
{ "QUARTER", 0, 0, 0, ""},
608
{ "QUERY", 0, 0, 0, ""},
609
{ "QUICK", 0, 0, 0, ""},
610
{ "READ", 0, 0, 0, ""},
611
{ "READS", 0, 0, 0, ""},
612
{ "REAL", 0, 0, 0, ""},
613
{ "RECOVER", 0, 0, 0, ""},
614
{ "REDUNDANT", 0, 0, 0, ""},
615
{ "REFERENCES", 0, 0, 0, ""},
616
{ "REGEXP", 0, 0, 0, ""},
617
{ "RELAY_LOG_FILE", 0, 0, 0, ""},
618
{ "RELAY_LOG_POS", 0, 0, 0, ""},
619
{ "RELAY_THREAD", 0, 0, 0, ""},
620
{ "RELEASE", 0, 0, 0, ""},
621
{ "RELOAD", 0, 0, 0, ""},
622
{ "RENAME", 0, 0, 0, ""},
623
{ "REPAIR", 0, 0, 0, ""},
624
{ "REPEATABLE", 0, 0, 0, ""},
625
{ "REPLACE", 0, 0, 0, ""},
626
{ "REPLICATION", 0, 0, 0, ""},
627
{ "REPEAT", 0, 0, 0, ""},
628
{ "REQUIRE", 0, 0, 0, ""},
629
{ "RESET", 0, 0, 0, ""},
630
{ "RESTORE", 0, 0, 0, ""},
631
{ "RESTRICT", 0, 0, 0, ""},
632
{ "RESUME", 0, 0, 0, ""},
633
{ "RETURN", 0, 0, 0, ""},
634
{ "RETURNS", 0, 0, 0, ""},
635
{ "REVOKE", 0, 0, 0, ""},
636
{ "RIGHT", 0, 0, 0, ""},
637
{ "RLIKE", 0, 0, 0, ""},
638
{ "ROLLBACK", 0, 0, 0, ""},
639
{ "ROLLUP", 0, 0, 0, ""},
640
{ "ROUTINE", 0, 0, 0, ""},
641
{ "ROW", 0, 0, 0, ""},
642
{ "ROWS", 0, 0, 0, ""},
643
{ "ROW_FORMAT", 0, 0, 0, ""},
644
{ "RTREE", 0, 0, 0, ""},
645
{ "SAVEPOINT", 0, 0, 0, ""},
646
{ "SCHEMA", 0, 0, 0, ""},
647
{ "SCHEMAS", 0, 0, 0, ""},
648
{ "SECOND", 0, 0, 0, ""},
649
{ "SECOND_MICROSECOND", 0, 0, 0, ""},
650
{ "SECURITY", 0, 0, 0, ""},
651
{ "SELECT", 0, 0, 0, ""},
652
{ "SENSITIVE", 0, 0, 0, ""},
653
{ "SEPARATOR", 0, 0, 0, ""},
654
{ "SERIAL", 0, 0, 0, ""},
655
{ "SERIALIZABLE", 0, 0, 0, ""},
656
{ "SESSION", 0, 0, 0, ""},
657
{ "SET", 0, 0, 0, ""},
658
{ "SHARE", 0, 0, 0, ""},
659
{ "SHOW", 0, 0, 0, ""},
660
{ "SHUTDOWN", 0, 0, 0, ""},
661
{ "SIGNED", 0, 0, 0, ""},
662
{ "SIMPLE", 0, 0, 0, ""},
663
{ "SLAVE", 0, 0, 0, ""},
664
{ "SNAPSHOT", 0, 0, 0, ""},
665
{ "SMALLINT", 0, 0, 0, ""},
666
{ "SOME", 0, 0, 0, ""},
667
{ "SONAME", 0, 0, 0, ""},
668
{ "SOUNDS", 0, 0, 0, ""},
669
{ "SPATIAL", 0, 0, 0, ""},
670
{ "SPECIFIC", 0, 0, 0, ""},
671
{ "SQL", 0, 0, 0, ""},
672
{ "SQLEXCEPTION", 0, 0, 0, ""},
673
{ "SQLSTATE", 0, 0, 0, ""},
674
{ "SQLWARNING", 0, 0, 0, ""},
675
{ "SQL_BIG_RESULT", 0, 0, 0, ""},
676
{ "SQL_BUFFER_RESULT", 0, 0, 0, ""},
677
{ "SQL_CACHE", 0, 0, 0, ""},
678
{ "SQL_CALC_FOUND_ROWS", 0, 0, 0, ""},
679
{ "SQL_NO_CACHE", 0, 0, 0, ""},
680
{ "SQL_SMALL_RESULT", 0, 0, 0, ""},
681
{ "SQL_THREAD", 0, 0, 0, ""},
682
{ "SQL_TSI_FRAC_SECOND", 0, 0, 0, ""},
683
{ "SQL_TSI_SECOND", 0, 0, 0, ""},
684
{ "SQL_TSI_MINUTE", 0, 0, 0, ""},
685
{ "SQL_TSI_HOUR", 0, 0, 0, ""},
686
{ "SQL_TSI_DAY", 0, 0, 0, ""},
687
{ "SQL_TSI_WEEK", 0, 0, 0, ""},
688
{ "SQL_TSI_MONTH", 0, 0, 0, ""},
689
{ "SQL_TSI_QUARTER", 0, 0, 0, ""},
690
{ "SQL_TSI_YEAR", 0, 0, 0, ""},
691
{ "SSL", 0, 0, 0, ""},
692
{ "START", 0, 0, 0, ""},
693
{ "STARTING", 0, 0, 0, ""},
694
{ "STATUS", 0, 0, 0, ""},
695
{ "STOP", 0, 0, 0, ""},
696
{ "STORAGE", 0, 0, 0, ""},
697
{ "STRAIGHT_JOIN", 0, 0, 0, ""},
698
{ "STRING", 0, 0, 0, ""},
699
{ "STRIPED", 0, 0, 0, ""},
700
{ "SUBJECT", 0, 0, 0, ""},
701
{ "SUPER", 0, 0, 0, ""},
702
{ "SUSPEND", 0, 0, 0, ""},
703
{ "TABLE", 0, 0, 0, ""},
704
{ "TABLES", 0, 0, 0, ""},
705
{ "TABLESPACE", 0, 0, 0, ""},
706
{ "TEMPORARY", 0, 0, 0, ""},
707
{ "TEMPTABLE", 0, 0, 0, ""},
708
{ "TERMINATED", 0, 0, 0, ""},
709
{ "TEXT", 0, 0, 0, ""},
710
{ "THEN", 0, 0, 0, ""},
711
{ "TIME", 0, 0, 0, ""},
712
{ "TIMESTAMP", 0, 0, 0, ""},
713
{ "TIMESTAMPADD", 0, 0, 0, ""},
714
{ "TIMESTAMPDIFF", 0, 0, 0, ""},
715
{ "TINYINT", 0, 0, 0, ""},
716
{ "TINYTEXT", 0, 0, 0, ""},
717
{ "TO", 0, 0, 0, ""},
718
{ "TRAILING", 0, 0, 0, ""},
719
{ "TRANSACTION", 0, 0, 0, ""},
720
{ "TRIGGER", 0, 0, 0, ""},
721
{ "TRIGGERS", 0, 0, 0, ""},
722
{ "TRUE", 0, 0, 0, ""},
723
{ "TRUNCATE", 0, 0, 0, ""},
724
{ "TYPE", 0, 0, 0, ""},
725
{ "TYPES", 0, 0, 0, ""},
726
{ "UNCOMMITTED", 0, 0, 0, ""},
727
{ "UNDEFINED", 0, 0, 0, ""},
728
{ "UNDO", 0, 0, 0, ""},
729
{ "UNICODE", 0, 0, 0, ""},
730
{ "UNION", 0, 0, 0, ""},
731
{ "UNIQUE", 0, 0, 0, ""},
732
{ "UNKNOWN", 0, 0, 0, ""},
733
{ "UNLOCK", 0, 0, 0, ""},
734
{ "UNSIGNED", 0, 0, 0, ""},
735
{ "UNTIL", 0, 0, 0, ""},
736
{ "UPDATE", 0, 0, 0, ""},
737
{ "UPGRADE", 0, 0, 0, ""},
738
{ "USAGE", 0, 0, 0, ""},
739
{ "USE", 0, 0, 0, ""},
740
{ "USER", 0, 0, 0, ""},
741
{ "USER_RESOURCES", 0, 0, 0, ""},
742
{ "USE_FRM", 0, 0, 0, ""},
743
{ "USING", 0, 0, 0, ""},
744
{ "UTC_DATE", 0, 0, 0, ""},
745
{ "UTC_TIME", 0, 0, 0, ""},
746
{ "UTC_TIMESTAMP", 0, 0, 0, ""},
747
{ "VALUE", 0, 0, 0, ""},
748
{ "VALUES", 0, 0, 0, ""},
749
{ "VARBINARY", 0, 0, 0, ""},
750
{ "VARCHAR", 0, 0, 0, ""},
751
{ "VARCHARACTER", 0, 0, 0, ""},
752
{ "VARIABLES", 0, 0, 0, ""},
753
{ "VARYING", 0, 0, 0, ""},
754
{ "WARNINGS", 0, 0, 0, ""},
755
{ "WEEK", 0, 0, 0, ""},
756
{ "WHEN", 0, 0, 0, ""},
757
{ "WHERE", 0, 0, 0, ""},
758
{ "WHILE", 0, 0, 0, ""},
759
{ "VIEW", 0, 0, 0, ""},
760
{ "WITH", 0, 0, 0, ""},
761
{ "WORK", 0, 0, 0, ""},
762
{ "WRITE", 0, 0, 0, ""},
763
{ "X509", 0, 0, 0, ""},
764
{ "XOR", 0, 0, 0, ""},
765
{ "XA", 0, 0, 0, ""},
766
{ "YEAR", 0, 0, 0, ""},
767
{ "YEAR_MONTH", 0, 0, 0, ""},
768
{ "ZEROFILL", 0, 0, 0, ""},
769
{ "ABS", 0, 0, 0, ""},
770
{ "ACOS", 0, 0, 0, ""},
771
{ "ADDDATE", 0, 0, 0, ""},
772
{ "ADDTIME", 0, 0, 0, ""},
773
{ "AES_ENCRYPT", 0, 0, 0, ""},
774
{ "AES_DECRYPT", 0, 0, 0, ""},
775
{ "AREA", 0, 0, 0, ""},
776
{ "ASIN", 0, 0, 0, ""},
777
{ "ASBINARY", 0, 0, 0, ""},
778
{ "ASTEXT", 0, 0, 0, ""},
779
{ "ASWKB", 0, 0, 0, ""},
780
{ "ASWKT", 0, 0, 0, ""},
781
{ "ATAN", 0, 0, 0, ""},
782
{ "ATAN2", 0, 0, 0, ""},
783
{ "BENCHMARK", 0, 0, 0, ""},
784
{ "BIN", 0, 0, 0, ""},
785
{ "BIT_COUNT", 0, 0, 0, ""},
786
{ "BIT_OR", 0, 0, 0, ""},
787
{ "BIT_AND", 0, 0, 0, ""},
788
{ "BIT_XOR", 0, 0, 0, ""},
789
{ "CAST", 0, 0, 0, ""},
790
{ "CEIL", 0, 0, 0, ""},
791
{ "CEILING", 0, 0, 0, ""},
792
{ "BIT_LENGTH", 0, 0, 0, ""},
793
{ "CENTROID", 0, 0, 0, ""},
794
{ "CHAR_LENGTH", 0, 0, 0, ""},
795
{ "CHARACTER_LENGTH", 0, 0, 0, ""},
796
{ "COALESCE", 0, 0, 0, ""},
797
{ "COERCIBILITY", 0, 0, 0, ""},
798
{ "COMPRESS", 0, 0, 0, ""},
799
{ "CONCAT", 0, 0, 0, ""},
800
{ "CONCAT_WS", 0, 0, 0, ""},
801
{ "CONNECTION_ID", 0, 0, 0, ""},
802
{ "CONV", 0, 0, 0, ""},
803
{ "CONVERT_TZ", 0, 0, 0, ""},
804
{ "COUNT", 0, 0, 0, ""},
805
{ "COS", 0, 0, 0, ""},
806
{ "COT", 0, 0, 0, ""},
807
{ "CRC32", 0, 0, 0, ""},
808
{ "CROSSES", 0, 0, 0, ""},
809
{ "CURDATE", 0, 0, 0, ""},
810
{ "CURTIME", 0, 0, 0, ""},
811
{ "DATE_ADD", 0, 0, 0, ""},
812
{ "DATEDIFF", 0, 0, 0, ""},
813
{ "DATE_FORMAT", 0, 0, 0, ""},
814
{ "DATE_SUB", 0, 0, 0, ""},
815
{ "DAYNAME", 0, 0, 0, ""},
816
{ "DAYOFMONTH", 0, 0, 0, ""},
817
{ "DAYOFWEEK", 0, 0, 0, ""},
818
{ "DAYOFYEAR", 0, 0, 0, ""},
819
{ "DECODE", 0, 0, 0, ""},
820
{ "DEGREES", 0, 0, 0, ""},
821
{ "DES_ENCRYPT", 0, 0, 0, ""},
822
{ "DES_DECRYPT", 0, 0, 0, ""},
823
{ "DIMENSION", 0, 0, 0, ""},
824
{ "DISJOINT", 0, 0, 0, ""},
825
{ "ELT", 0, 0, 0, ""},
826
{ "ENCODE", 0, 0, 0, ""},
827
{ "ENCRYPT", 0, 0, 0, ""},
828
{ "ENDPOINT", 0, 0, 0, ""},
829
{ "ENVELOPE", 0, 0, 0, ""},
830
{ "EQUALS", 0, 0, 0, ""},
831
{ "EXTERIORRING", 0, 0, 0, ""},
832
{ "EXTRACT", 0, 0, 0, ""},
833
{ "EXP", 0, 0, 0, ""},
834
{ "EXPORT_SET", 0, 0, 0, ""},
835
{ "FIELD", 0, 0, 0, ""},
836
{ "FIND_IN_SET", 0, 0, 0, ""},
837
{ "FLOOR", 0, 0, 0, ""},
838
{ "FORMAT", 0, 0, 0, ""},
839
{ "FOUND_ROWS", 0, 0, 0, ""},
840
{ "FROM_DAYS", 0, 0, 0, ""},
841
{ "FROM_UNIXTIME", 0, 0, 0, ""},
842
{ "GET_LOCK", 0, 0, 0, ""},
843
{ "GLENGTH", 0, 0, 0, ""},
844
{ "GREATEST", 0, 0, 0, ""},
845
{ "GROUP_CONCAT", 0, 0, 0, ""},
846
{ "GROUP_UNIQUE_USERS", 0, 0, 0, ""},
847
{ "HEX", 0, 0, 0, ""},
848
{ "IFNULL", 0, 0, 0, ""},
849
{ "INET_ATON", 0, 0, 0, ""},
850
{ "INET_NTOA", 0, 0, 0, ""},
851
{ "INSTR", 0, 0, 0, ""},
852
{ "INTERIORRINGN", 0, 0, 0, ""},
853
{ "INTERSECTS", 0, 0, 0, ""},
854
{ "ISCLOSED", 0, 0, 0, ""},
855
{ "ISEMPTY", 0, 0, 0, ""},
856
{ "ISNULL", 0, 0, 0, ""},
857
{ "IS_FREE_LOCK", 0, 0, 0, ""},
858
{ "IS_USED_LOCK", 0, 0, 0, ""},
859
{ "LAST_INSERT_ID", 0, 0, 0, ""},
860
{ "ISSIMPLE", 0, 0, 0, ""},
861
{ "LAST_DAY", 0, 0, 0, ""},
862
{ "LCASE", 0, 0, 0, ""},
863
{ "LEAST", 0, 0, 0, ""},
864
{ "LENGTH", 0, 0, 0, ""},
865
{ "LN", 0, 0, 0, ""},
866
{ "LINEFROMTEXT", 0, 0, 0, ""},
867
{ "LINEFROMWKB", 0, 0, 0, ""},
868
{ "LINESTRINGFROMTEXT", 0, 0, 0, ""},
869
{ "LINESTRINGFROMWKB", 0, 0, 0, ""},
870
{ "LOAD_FILE", 0, 0, 0, ""},
871
{ "LOCATE", 0, 0, 0, ""},
872
{ "LOG", 0, 0, 0, ""},
873
{ "LOG2", 0, 0, 0, ""},
874
{ "LOG10", 0, 0, 0, ""},
875
{ "LOWER", 0, 0, 0, ""},
876
{ "LPAD", 0, 0, 0, ""},
877
{ "LTRIM", 0, 0, 0, ""},
878
{ "MAKE_SET", 0, 0, 0, ""},
879
{ "MAKEDATE", 0, 0, 0, ""},
880
{ "MAKETIME", 0, 0, 0, ""},
881
{ "MASTER_POS_WAIT", 0, 0, 0, ""},
882
{ "MAX", 0, 0, 0, ""},
883
{ "MBRCONTAINS", 0, 0, 0, ""},
884
{ "MBRDISJOINT", 0, 0, 0, ""},
885
{ "MBREQUAL", 0, 0, 0, ""},
886
{ "MBRINTERSECTS", 0, 0, 0, ""},
887
{ "MBROVERLAPS", 0, 0, 0, ""},
888
{ "MBRTOUCHES", 0, 0, 0, ""},
889
{ "MBRWITHIN", 0, 0, 0, ""},
890
{ "MD5", 0, 0, 0, ""},
891
{ "MID", 0, 0, 0, ""},
892
{ "MIN", 0, 0, 0, ""},
893
{ "MLINEFROMTEXT", 0, 0, 0, ""},
894
{ "MLINEFROMWKB", 0, 0, 0, ""},
895
{ "MPOINTFROMTEXT", 0, 0, 0, ""},
896
{ "MPOINTFROMWKB", 0, 0, 0, ""},
897
{ "MPOLYFROMTEXT", 0, 0, 0, ""},
898
{ "MPOLYFROMWKB", 0, 0, 0, ""},
899
{ "MONTHNAME", 0, 0, 0, ""},
900
{ "MULTILINESTRINGFROMTEXT", 0, 0, 0, ""},
901
{ "MULTILINESTRINGFROMWKB", 0, 0, 0, ""},
902
{ "MULTIPOINTFROMTEXT", 0, 0, 0, ""},
903
{ "MULTIPOINTFROMWKB", 0, 0, 0, ""},
904
{ "MULTIPOLYGONFROMTEXT", 0, 0, 0, ""},
905
{ "MULTIPOLYGONFROMWKB", 0, 0, 0, ""},
906
{ "NAME_CONST", 0, 0, 0, ""},
907
{ "NOW", 0, 0, 0, ""},
908
{ "NULLIF", 0, 0, 0, ""},
909
{ "NUMINTERIORRINGS", 0, 0, 0, ""},
910
{ "NUMPOINTS", 0, 0, 0, ""},
911
{ "OCTET_LENGTH", 0, 0, 0, ""},
912
{ "OCT", 0, 0, 0, ""},
913
{ "ORD", 0, 0, 0, ""},
914
{ "OVERLAPS", 0, 0, 0, ""},
915
{ "PERIOD_ADD", 0, 0, 0, ""},
916
{ "PERIOD_DIFF", 0, 0, 0, ""},
917
{ "PI", 0, 0, 0, ""},
918
{ "POINTFROMTEXT", 0, 0, 0, ""},
919
{ "POINTFROMWKB", 0, 0, 0, ""},
920
{ "POINTN", 0, 0, 0, ""},
921
{ "POLYFROMTEXT", 0, 0, 0, ""},
922
{ "POLYFROMWKB", 0, 0, 0, ""},
923
{ "POLYGONFROMTEXT", 0, 0, 0, ""},
924
{ "POLYGONFROMWKB", 0, 0, 0, ""},
925
{ "POSITION", 0, 0, 0, ""},
926
{ "POW", 0, 0, 0, ""},
927
{ "POWER", 0, 0, 0, ""},
928
{ "QUOTE", 0, 0, 0, ""},
929
{ "RADIANS", 0, 0, 0, ""},
930
{ "RAND", 0, 0, 0, ""},
931
{ "RELEASE_LOCK", 0, 0, 0, ""},
932
{ "REVERSE", 0, 0, 0, ""},
933
{ "ROUND", 0, 0, 0, ""},
934
{ "ROW_COUNT", 0, 0, 0, ""},
935
{ "RPAD", 0, 0, 0, ""},
936
{ "RTRIM", 0, 0, 0, ""},
937
{ "SEC_TO_TIME", 0, 0, 0, ""},
938
{ "SESSION_USER", 0, 0, 0, ""},
939
{ "SUBDATE", 0, 0, 0, ""},
940
{ "SIGN", 0, 0, 0, ""},
941
{ "SIN", 0, 0, 0, ""},
942
{ "SHA", 0, 0, 0, ""},
943
{ "SHA1", 0, 0, 0, ""},
944
{ "SLEEP", 0, 0, 0, ""},
945
{ "SOUNDEX", 0, 0, 0, ""},
946
{ "SPACE", 0, 0, 0, ""},
947
{ "SQRT", 0, 0, 0, ""},
948
{ "SRID", 0, 0, 0, ""},
949
{ "STARTPOINT", 0, 0, 0, ""},
950
{ "STD", 0, 0, 0, ""},
951
{ "STDDEV", 0, 0, 0, ""},
952
{ "STDDEV_POP", 0, 0, 0, ""},
953
{ "STDDEV_SAMP", 0, 0, 0, ""},
954
{ "STR_TO_DATE", 0, 0, 0, ""},
955
{ "STRCMP", 0, 0, 0, ""},
956
{ "SUBSTR", 0, 0, 0, ""},
957
{ "SUBSTRING", 0, 0, 0, ""},
958
{ "SUBSTRING_INDEX", 0, 0, 0, ""},
959
{ "SUBTIME", 0, 0, 0, ""},
960
{ "SUM", 0, 0, 0, ""},
961
{ "SYSDATE", 0, 0, 0, ""},
962
{ "SYSTEM_USER", 0, 0, 0, ""},
963
{ "TAN", 0, 0, 0, ""},
964
{ "TIME_FORMAT", 0, 0, 0, ""},
965
{ "TIME_TO_SEC", 0, 0, 0, ""},
966
{ "TIMEDIFF", 0, 0, 0, ""},
967
{ "TO_DAYS", 0, 0, 0, ""},
968
{ "TOUCHES", 0, 0, 0, ""},
969
{ "TRIM", 0, 0, 0, ""},
970
{ "UCASE", 0, 0, 0, ""},
971
{ "UNCOMPRESS", 0, 0, 0, ""},
972
{ "UNCOMPRESSED_LENGTH", 0, 0, 0, ""},
973
{ "UNHEX", 0, 0, 0, ""},
974
{ "UNIQUE_USERS", 0, 0, 0, ""},
975
{ "UNIX_TIMESTAMP", 0, 0, 0, ""},
976
{ "UPPER", 0, 0, 0, ""},
977
{ "UUID", 0, 0, 0, ""},
978
{ "VARIANCE", 0, 0, 0, ""},
979
{ "VAR_POP", 0, 0, 0, ""},
980
{ "VAR_SAMP", 0, 0, 0, ""},
981
{ "VERSION", 0, 0, 0, ""},
982
{ "WEEKDAY", 0, 0, 0, ""},
983
{ "WEEKOFYEAR", 0, 0, 0, ""},
984
{ "WITHIN", 0, 0, 0, ""},
987
{ "YEARWEEK", 0, 0, 0, ""},
1152
988
/* end sentinel */
1153
Commands((char *)NULL, 0, 0, 0, "")
989
{ (char *)NULL, 0, 0, 0, ""}
992
static const char *load_default_groups[]= { "drizzle","client",0 };
1157
994
int history_length;
1158
995
static int not_in_history(const char *line);
1159
996
static void initialize_readline (char *name);
1160
997
static void fix_history(string *final_command);
1162
static Commands *find_command(const char *name,char cmd_name);
999
static COMMANDS *find_command(const char *name,char cmd_name);
1163
1000
static bool add_line(string *buffer,char *line,char *in_string,
1164
1001
bool *ml_comment);
1165
1002
static void remove_cntrl(string *buffer);
1166
static void print_table_data(drizzle_result_st *result);
1167
static void print_tab_data(drizzle_result_st *result);
1168
static void print_table_data_vertically(drizzle_result_st *result);
1169
static void print_warnings(uint32_t error_code);
1170
static boost::posix_time::ptime start_timer(void);
1171
static void end_timer(boost::posix_time::ptime, string &buff);
1172
static void drizzle_end_timer(boost::posix_time::ptime, string &buff);
1173
static void nice_time(boost::posix_time::time_duration duration, string &buff);
1174
extern "C" void drizzle_end(int sig);
1175
extern "C" void handle_sigint(int sig);
1003
static void print_table_data(DRIZZLE_RES *result);
1004
static void print_tab_data(DRIZZLE_RES *result);
1005
static void print_table_data_vertically(DRIZZLE_RES *result);
1006
static void print_warnings(void);
1007
static uint32_t start_timer(void);
1008
static void end_timer(uint32_t start_time,char *buff);
1009
static void drizzle_end_timer(uint32_t start_time,char *buff);
1010
static void nice_time(double sec,char *buff,bool part_second);
1011
extern "C" RETSIGTYPE drizzle_end(int sig);
1012
extern "C" RETSIGTYPE handle_sigint(int sig);
1176
1013
#if defined(HAVE_TERMIOS_H) && defined(GWINSZ_IN_SYS_IOCTL)
1177
static void window_resize(int sig);
1014
static RETSIGTYPE window_resize(int sig);
1181
Shutdown the server that we are currently connected to.
1188
static bool server_shutdown(void)
1190
drizzle_result_st result;
1191
drizzle_return_t ret;
1195
printf(_("shutting down drizzled"));
1196
if (opt_drizzle_port > 0)
1197
printf(_(" on port %d"), opt_drizzle_port);
1201
if (drizzle_shutdown(&con, &result, DRIZZLE_SHUTDOWN_DEFAULT,
1202
&ret) == NULL || ret != DRIZZLE_RETURN_OK)
1204
if (ret == DRIZZLE_RETURN_ERROR_CODE)
1206
fprintf(stderr, _("shutdown failed; error: '%s'"),
1207
drizzle_result_error(&result));
1208
drizzle_result_free(&result);
1212
fprintf(stderr, _("shutdown failed; error: '%s'"),
1213
drizzle_con_error(&con));
1218
drizzle_result_free(&result);
1221
printf(_("done\n"));
1227
Ping the server that we are currently connected to.
1234
static bool server_ping(void)
1236
drizzle_result_st result;
1237
drizzle_return_t ret;
1239
if (drizzle_ping(&con, &result, &ret) != NULL && ret == DRIZZLE_RETURN_OK)
1242
printf(_("drizzled is alive\n"));
1246
if (ret == DRIZZLE_RETURN_ERROR_CODE)
1248
fprintf(stderr, _("ping failed; error: '%s'"),
1249
drizzle_result_error(&result));
1250
drizzle_result_free(&result);
1254
fprintf(stderr, _("drizzled won't answer to ping, error: '%s'"),
1255
drizzle_con_error(&con));
1259
drizzle_result_free(&result);
1264
Execute command(s) specified by the user.
1266
@param error error status of command execution.
1267
If an error had occurred, this variable will be set
1268
to 1 whereas on success, it shall be set to 0. This
1269
value will be supplied to the exit() function used
1273
false no commands were executed
1275
true at least one command was executed
1277
static bool execute_commands(int *error)
1279
bool executed= false;
1284
if (server_ping() == false)
1291
if (server_shutdown() == false)
1298
static void check_timeout_value(uint32_t in_connect_timeout)
1300
opt_connect_timeout= 0;
1301
if (in_connect_timeout > 3600*12)
1303
cout << _("Error: Invalid Value for connect_timeout");
1306
opt_connect_timeout= in_connect_timeout;
1309
static void check_max_input_line(uint32_t in_max_input_line)
1311
opt_max_input_line= 0;
1312
if (in_max_input_line < 4096 || in_max_input_line > (int64_t)2*1024L*1024L*1024L)
1314
cout << _("Error: Invalid Value for max_input_line");
1317
opt_max_input_line= in_max_input_line - (in_max_input_line % 1024);
1320
1017
int main(int argc,char *argv[])
1325
1021
#if defined(ENABLE_NLS)
1326
1022
# if defined(HAVE_LOCALE_H)
1327
1023
setlocale(LC_ALL, "");
1329
bindtextdomain("drizzle7", LOCALEDIR);
1330
textdomain("drizzle7");
1333
po::options_description commandline_options(_("Options used only in command line"));
1334
commandline_options.add_options()
1335
("help,?",_("Displays this help and exit."))
1336
("batch,B",_("Don't use history file. Disable interactive behavior. (Enables --silent)"))
1337
("column-type-info", po::value<bool>(&column_types_flag)->default_value(false)->zero_tokens(),
1338
_("Display column type information."))
1339
("comments,c", po::value<bool>(&preserve_comments)->default_value(false)->zero_tokens(),
1340
_("Preserve comments. Send comments to the server. The default is --skip-comments (discard comments), enable with --comments"))
1341
("vertical,E", po::value<bool>(&vertical)->default_value(false)->zero_tokens(),
1342
_("Print the output of a query (rows) vertically."))
1343
("force,f", po::value<bool>(&ignore_errors)->default_value(false)->zero_tokens(),
1344
_("Continue even if we get an sql error."))
1345
("named-commands,G", po::value<bool>(&named_cmds)->default_value(false)->zero_tokens(),
1346
_("Enable named commands. Named commands mean this program's internal commands; see drizzle> help . When enabled, the named commands can be used from any line of the query, otherwise only from the first line, before an enter."))
1347
("no-beep,b", po::value<bool>(&opt_nobeep)->default_value(false)->zero_tokens(),
1348
_("Turn off beep on error."))
1349
("disable-line-numbers", _("Do not write line numbers for errors."))
1350
("disable-column-names", _("Do not write column names in results."))
1351
("skip-column-names,N",
1352
_("Don't write column names in results. WARNING: -N is deprecated, use long version of this options instead."))
1353
("set-variable,O", po::value<string>(),
1354
_("Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value."))
1355
("table,t", po::value<bool>(&output_tables)->default_value(false)->zero_tokens(),
1356
_("Output in table format."))
1357
("safe-updates,U", po::value<bool>(&safe_updates)->default_value(false)->zero_tokens(),
1358
_("Only allow UPDATE and DELETE that uses keys."))
1359
("i-am-a-dummy,U", po::value<bool>(&safe_updates)->default_value(false)->zero_tokens(),
1360
_("Synonym for option --safe-updates, -U."))
1361
("verbose,v", po::value<string>(&opt_verbose)->default_value(""),
1362
_("-v vvv implies that verbose= 3, Used to specify verbose"))
1363
("version,V", _("Output version information and exit."))
1364
("secure-auth", po::value<bool>(&opt_secure_auth)->default_value(false)->zero_tokens(),
1365
_("Refuse client connecting to server if it uses old (pre-4.1.1) protocol"))
1366
("show-warnings", po::value<bool>(&show_warnings)->default_value(false)->zero_tokens(),
1367
_("Show warnings after every statement."))
1368
("show-progress-size", po::value<uint32_t>(&show_progress_size)->default_value(0),
1369
_("Number of lines before each import progress report."))
1370
("ping", po::value<bool>(&opt_ping)->default_value(false)->zero_tokens(),
1371
_("Ping the server to check if it's alive."))
1372
("no-defaults", po::value<bool>()->default_value(false)->zero_tokens(),
1373
_("Configuration file defaults are not used if no-defaults is set"))
1376
po::options_description drizzle_options(_("Options specific to the drizzle client"));
1377
drizzle_options.add_options()
1378
("disable-auto-rehash,A",
1379
_("Disable automatic rehashing. One doesn't need to use 'rehash' to get table and field completion, but startup and reconnecting may take a longer time."))
1380
("auto-vertical-output", po::value<bool>(&auto_vertical_output)->default_value(false)->zero_tokens(),
1381
_("Automatically switch to vertical output mode if the result is wider than the terminal width."))
1382
("database,D", po::value<string>(¤t_db)->default_value(""),
1383
_("Database to use."))
1384
("default-character-set",po::value<string>(),
1386
("delimiter", po::value<string>(&delimiter_str)->default_value(";"),
1387
_("Delimiter to be used."))
1388
("execute,e", po::value<string>(),
1389
_("Execute command and quit. (Disables --force and history file)"))
1390
("local-infile", po::value<bool>(&opt_local_infile)->default_value(false)->zero_tokens(),
1391
_("Enable LOAD DATA LOCAL INFILE."))
1392
("unbuffered,n", po::value<bool>(&unbuffered)->default_value(false)->zero_tokens(),
1393
_("Flush buffer after each query."))
1394
("sigint-ignore", po::value<bool>(&opt_sigint_ignore)->default_value(false)->zero_tokens(),
1395
_("Ignore SIGINT (CTRL-C)"))
1396
("one-database,o", po::value<bool>(&one_database)->default_value(false)->zero_tokens(),
1397
_("Only update the default database. This is useful for skipping updates to other database in the update log."))
1398
("pager", po::value<string>(),
1399
_("Pager to use to display results. If you don't supply an option the default pager is taken from your ENV variable PAGER. Valid pagers are less, more, cat [> filename], etc. See interactive help (\\h) also. This option does not work in batch mode. Disable with --disable-pager. This option is disabled by default."))
1400
("disable-pager", po::value<bool>(&opt_nopager)->default_value(false)->zero_tokens(),
1401
_("Disable pager and print to stdout. See interactive help (\\h) also."))
1402
("prompt", po::value<string>(¤t_prompt)->default_value(""),
1403
_("Set the drizzle prompt to this value."))
1404
("quick,q", po::value<bool>(&quick)->default_value(false)->zero_tokens(),
1405
_("Don't cache result, print it row by row. This may slow down the server if the output is suspended. Doesn't use history file."))
1406
("raw,r", po::value<bool>(&opt_raw_data)->default_value(false)->zero_tokens(),
1407
_("Write fields without conversion. Used with --batch."))
1408
("disable-reconnect", _("Do not reconnect if the connection is lost."))
1409
("shutdown", po::value<bool>()->zero_tokens(),
1410
_("Shutdown the server"))
1411
("silent,s", _("Be more silent. Print results with a tab as separator, each row on new line."))
1412
("tee", po::value<string>(),
1413
_("Append everything into outfile. See interactive help (\\h) also. Does not work in batch mode. Disable with --disable-tee. This option is disabled by default."))
1414
("disable-tee", po::value<bool>()->default_value(false)->zero_tokens(),
1415
_("Disable outfile. See interactive help (\\h) also."))
1416
("connect-timeout", po::value<uint32_t>(&opt_connect_timeout)->default_value(0)->notifier(&check_timeout_value),
1417
_("Number of seconds before connection timeout."))
1418
("max-input-line", po::value<uint32_t>(&opt_max_input_line)->default_value(16*1024L*1024L)->notifier(&check_max_input_line),
1419
_("Max length of input line"))
1420
("select-limit", po::value<uint32_t>(&select_limit)->default_value(1000L),
1421
_("Automatic limit for SELECT when using --safe-updates"))
1422
("max-join-size", po::value<uint32_t>(&max_join_size)->default_value(1000000L),
1423
_("Automatic limit for rows in a join when using --safe-updates"))
1426
po::options_description client_options(_("Options specific to the client"));
1427
client_options.add_options()
1428
("host,h", po::value<string>(¤t_host)->default_value("localhost"),
1429
_("Connect to host"))
1430
("password,P", po::value<string>(¤t_password)->default_value(PASSWORD_SENTINEL),
1431
_("Password to use when connecting to server. If password is not given it's asked from the tty."))
1432
("port,p", po::value<uint32_t>()->default_value(0),
1433
_("Port number to use for connection or 0 for default to, in order of preference, drizzle.cnf, $DRIZZLE_TCP_PORT, built-in default"))
1434
#ifdef DRIZZLE_ADMIN_TOOL
1435
("user,u", po::value<string>(¤t_user)->default_value("root"),
1437
("user,u", po::value<string>(¤t_user)->default_value(""),
1439
_("User for login if not current user."))
1440
("protocol",po::value<string>(&opt_protocol)->default_value("mysql"),
1441
_("The protocol of connection (mysql or drizzle)."))
1444
po::options_description long_options(_("Allowed Options"));
1445
long_options.add(commandline_options).add(drizzle_options).add(client_options);
1447
std::string system_config_dir_drizzle(SYSCONFDIR);
1448
system_config_dir_drizzle.append("/drizzle/drizzle.cnf");
1450
std::string system_config_dir_client(SYSCONFDIR);
1451
system_config_dir_client.append("/drizzle/client.cnf");
1453
std::string user_config_dir((getenv("XDG_CONFIG_HOME")? getenv("XDG_CONFIG_HOME"):"~/.config"));
1455
if (user_config_dir.compare(0, 2, "~/") == 0)
1458
homedir= getenv("HOME");
1459
if (homedir != NULL)
1460
user_config_dir.replace(0, 1, homedir);
1463
po::variables_map vm;
1465
po::positional_options_description p;
1466
p.add("database", 1);
1468
// Disable allow_guessing
1469
int style = po::command_line_style::default_style & ~po::command_line_style::allow_guessing;
1471
po::store(po::command_line_parser(argc, argv).options(long_options).
1472
style(style).positional(p).extra_parser(parse_password_arg).run(),
1475
if (! vm["no-defaults"].as<bool>())
1477
std::string user_config_dir_drizzle(user_config_dir);
1478
user_config_dir_drizzle.append("/drizzle/drizzle.cnf");
1480
std::string user_config_dir_client(user_config_dir);
1481
user_config_dir_client.append("/drizzle/client.cnf");
1483
ifstream user_drizzle_ifs(user_config_dir_drizzle.c_str());
1484
po::store(dpo::parse_config_file(user_drizzle_ifs, drizzle_options), vm);
1486
ifstream user_client_ifs(user_config_dir_client.c_str());
1487
po::store(dpo::parse_config_file(user_client_ifs, client_options), vm);
1489
ifstream system_drizzle_ifs(system_config_dir_drizzle.c_str());
1490
store(dpo::parse_config_file(system_drizzle_ifs, drizzle_options), vm);
1492
ifstream system_client_ifs(system_config_dir_client.c_str());
1493
po::store(dpo::parse_config_file(system_client_ifs, client_options), vm);
1498
#ifdef DRIZZLE_ADMIN_TOOL
1499
default_prompt= strdup(getenv("DRIZZLE_PS1") ?
1500
getenv("DRIZZLE_PS1") :
1025
bindtextdomain("drizzle", LOCALEDIR);
1026
textdomain("drizzle");
1030
delimiter_str= delimiter;
1503
1031
default_prompt= strdup(getenv("DRIZZLE_PS1") ?
1504
1032
getenv("DRIZZLE_PS1") :
1507
1035
if (default_prompt == NULL)
1509
1037
fprintf(stderr, _("Memory allocation error while constructing initial "
1510
1038
"prompt. Aborting.\n"));
1514
if (current_prompt.empty())
1515
current_prompt= strdup(default_prompt);
1517
if (current_prompt.empty())
1041
current_prompt= strdup(default_prompt);
1042
if (current_prompt == NULL)
1519
1044
fprintf(stderr, _("Memory allocation error while constructing initial "
1520
1045
"prompt. Aborting.\n"));