~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to xtrabackup.c

fix REGEXP behavior (including database name)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1267
1267
        if (xtrabackup_tables && (node->space->id != 0)) { /* must backup id==0 */
1268
1268
                char *p;
1269
1269
                int p_len, regres;
1270
 
                char *next;
 
1270
                char *next, *prev;
1271
1271
                char tmp;
1272
1272
 
1273
1273
                p = node->name;
 
1274
                prev = NULL;
1274
1275
                while (next = strstr(p, "/")) {
 
1276
                        prev = p;
1275
1277
                        p = next + 1;
1276
1278
                }
1277
1279
                p_len = strlen(p) - strlen(".ibd");
1281
1283
                        goto skip_filter;
1282
1284
                }
1283
1285
 
1284
 
                /* lazy.. */
 
1286
                /* TODO: Fix this lazy implementation... */
1285
1287
                tmp = p[p_len];
1286
1288
                p[p_len] = 0;
 
1289
                *(p - 1) = '.';
1287
1290
 
1288
 
                regres = regexec(&tables_regex, p, 1, tables_regmatch, 0);
 
1291
                regres = regexec(&tables_regex, prev, 1, tables_regmatch, 0);
1289
1292
 
1290
1293
                p[p_len] = tmp;
 
1294
                *(p - 1) = '/';
1291
1295
 
1292
1296
                if ( regres == REG_NOMATCH ) {
1293
1297
                        printf("Copying %s is skipped.\n", node->name);