~mysql/mysql-server/mysql-6.0

« back to all changes in this revision

Viewing changes to regex/main.c

Merge with 4.0.3
Some simple optimzations, more comments and indentation changes.
Add ` around database in 'use database' in binary log.
Moved max_error_count and max_warning_count to variables struct.
Removed SHOW_WARNS_COUNT and SHOW_ERRORS_COUNT calls.
Changed string functions to use character set of first string argument as default return characterset
(Each string function can change the above assumption if needed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
                exit(status);
75
75
        }
76
76
 
77
 
        err = regcomp(&re, argv[optind++], copts);
 
77
        err = regcomp(&re, argv[optind++], copts, default_charset_info);
78
78
        if (err) {
79
79
                len = regerror(err, &re, erbuf, sizeof(erbuf));
80
80
                fprintf(stderr, "error %s, %d/%d `%s'\n",
226
226
        strcpy(f0copy, f0);
227
227
        re.re_endp = (opts&REG_PEND) ? f0copy + strlen(f0copy) : NULL;
228
228
        fixstr(f0copy);
229
 
        err = regcomp(&re, f0copy, opts);
 
229
        err = regcomp(&re, f0copy, opts, default_charset_info);
230
230
        if (err != 0 && (!opt('C', f1) || err != efind(f2))) {
231
231
                /* unexpected error or wrong error */
232
232
                len = regerror(err, &re, erbuf, sizeof(erbuf));