-
unknown authored
Loading 4.1 into 5.0 or 5.1 failed silently because procs_priv table missing. This caused the server to crash on any attempt to store new grants because of uninitialized structures. This patch breaks up the grant loading function into two phases to allow for procs_priv table to fail with an warning instead of crashing the server. mysql-test/r/grant.result: Test case mysql-test/t/grant.test: Test case making sure that FLUSH PRIVILEGES doesn't crash the server if procs_priv is removed. sql/sql_acl.cc: - Refactored grant_reload into two phases: 1. open and lock tables_priv and columns_priv tables, read the data, close tables. 2. open and lock procs_priv, read data, close table. Since the tables are independant of each other there will be no race conditions and it will be possible to handle situations where the procs_priv table isn't present. - Refactored the helper function grant_load into new grant_load (without procs_priv table) and grant_load_procs_priv. sql/sql_parse.cc: - Changed comment style to doxygen style.
1ddb4722