• Michael Widenius's avatar
    Fixed valgrind error when storing db_name_length in query_cache. · b22f3fd2
    Michael Widenius authored
    - Changed storage to be 2 bytes instead of sizeof(size_t) (simple optimization)
    - Fixed bug when using query_cache_strip_comments and query that started with '('
    - Fixed DBUG_PRINT() that used wrong (not initialized) variables.
    
    
    mysql-test/mysql-test-run.pl:
      Added some space to make output more readable.
    mysql-test/r/query_cache.result:
      Updated test results
    mysql-test/t/query_cache.test:
      Added test with query_cache_strip_comments
    sql/mysql_priv.h:
      Added QUERY_CACHE_DB_LENGTH_SIZE
    sql/sql_cache.cc:
      Fixed bug when using query_cache_strip_comments and query that started with '('
      Store db length in 2 characters instead of size_t.
      Get db length from correct position (earlier we had an error when query started with ' ')
      Fixed DBUG_PRINT() that used wrong (not initialized) variables.
    b22f3fd2
query_cache.test 48.7 KB