Skip to content
  • bin.x.su@oracle.com's avatar
    4b4cfa5a
    BUG 18277305 - FTS: FAILING ASSERTION: PTR[1] == '\"' IN · 4b4cfa5a
    bin.x.su@oracle.com authored
    FTS_AST_CREATE_NODE_TEXT
    
    For collation ujis_japanese_ci, utf8mb4_turkish_ci, eucjpms_bin, if we have
    a 0x00 in the fts query string, it might hit an assertion and server crash.
    
    We shouldn't truncate the trailing characters after the first 0x00 in query
    strings. Instead of using strdup to copy the query string between quotes, we
    save the whole string and its length during parsing. After that, the whole
    query string would be parsed again when we do query. And the current parsing
    during query would treat 0x00 as a separator, like myisam.
    
    Also, a memory leak issue is fixed. After we find a syntax error and try to
    abort, we have to free the last token first.
    
    rb#5152, approved by Jimmy
    4b4cfa5a
    BUG 18277305 - FTS: FAILING ASSERTION: PTR[1] == '\"' IN
    bin.x.su@oracle.com authored
    FTS_AST_CREATE_NODE_TEXT
    
    For collation ujis_japanese_ci, utf8mb4_turkish_ci, eucjpms_bin, if we have
    a 0x00 in the fts query string, it might hit an assertion and server crash.
    
    We shouldn't truncate the trailing characters after the first 0x00 in query
    strings. Instead of using strdup to copy the query string between quotes, we
    save the whole string and its length during parsing. After that, the whole
    query string would be parsed again when we do query. And the current parsing
    during query would treat 0x00 as a separator, like myisam.
    
    Also, a memory leak issue is fixed. After we find a syntax error and try to
    abort, we have to free the last token first.
    
    rb#5152, approved by Jimmy
Loading