• Venkata Sidagam's avatar
    Bug #12992993 MYSQLHOTCOPY FAILS IF VIEW EXISTS · 37d22846
    Venkata Sidagam authored
    Problem description:
    mysqlhotcopy fails if a view presents in the database.
    
    Analysis:
    Before 5.5 'FLUSH TABLES <tbl_name> ... WITH READ LOCK' will able 
    to get lock for all tables (i.e. base tables and view tables). 
    In 5.5 onwards 'FLUSH TABLES <tbl_name> ... WITH READ LOCK' for 
    'view tables' will not work, because taking flush locks on view 
    tables is not valid.
    
    Fix:
    Take flush lock for 'base tables' and read lock for 'view table' 
    separately.
    
    Note: most of the patch has been backported from bug#13006947's patch
    37d22846
mysqlhotcopy.sh 34 KB