• Alexander Barkov's avatar
    pcre: fixing a test failure in character_sets_dir_basic in this command: · 62260434
    Alexander Barkov authored
    --replace_regex /.prefix.sql.share.charsets[/\]/MYSQL_CHARSETSDIR/
    select @@global.character_sets_dir;
    
    The intention of the '[/\]' part was to replace both slash
    '/' and backslash '\\', so it does not depend on the OS.
    
    The pattern '[/\]' was actually wrong, because ']' is escaped
    and should be considered as a part of the class, instead of
    being a closing bracket for the class. However, due to some bug
    in the old REGEX library it worked fine.
    
    After switching to PCRE, mysqltest correctly complains about unbalaced '[]'.
    The expected correct pattern should be '[/\\]'.
    However, due to some bug in mysqltest, it eats consequetive baskslashes
    in a strange way, so there is no a way to have to consequetive 
    backslashes after unescaping.
    
    Workaround:
    
    using [[:punct:]] as a pattern that matches both slash and backslash,
    which should be fine for this test purposes.
    62260434
character_sets_dir_basic.test 1.17 KB