Commit 76c18f7e authored by Daniel Black's avatar Daniel Black

sql_print_information corrected

as checksum/swap don't always occur
parent 622891c6
...@@ -856,6 +856,8 @@ int mariadb_fix_view(THD *thd, TABLE_LIST *view, bool wrong_checksum, ...@@ -856,6 +856,8 @@ int mariadb_fix_view(THD *thd, TABLE_LIST *view, bool wrong_checksum,
else else
view->algorithm= VIEW_ALGORITHM_MERGE; view->algorithm= VIEW_ALGORITHM_MERGE;
} }
else
swap_alg= 0;
if (wrong_checksum) if (wrong_checksum)
{ {
if (view->md5.length != 32) if (view->md5.length != 32)
...@@ -875,10 +877,14 @@ int mariadb_fix_view(THD *thd, TABLE_LIST *view, bool wrong_checksum, ...@@ -875,10 +877,14 @@ int mariadb_fix_view(THD *thd, TABLE_LIST *view, bool wrong_checksum,
view->db, view->table_name); view->db, view->table_name);
DBUG_RETURN(HA_ADMIN_INTERNAL_ERROR); DBUG_RETURN(HA_ADMIN_INTERNAL_ERROR);
} }
sql_print_information("View '%-.192s'.'%-.192s': algorithm swapped to '%s'", sql_print_information("View '%-.192s'.'%-.192s': versioned to %llu%s%s",
view->db, view->table_name, view->db, view->table_name, view->mariadb_version,
(view->algorithm == VIEW_ALGORITHM_MERGE)? (wrong_checksum ? ", and checksum corrected" : ""),
"MERGE":"TEMPTABLE"); (swap_alg ?
((view->algorithm == VIEW_ALGORITHM_MERGE) ?
", and algorithm swapped to 'MERGE'"
: ", and algorithm swapped to 'TEMPTABLE'")
: ""));
DBUG_RETURN(HA_ADMIN_OK); DBUG_RETURN(HA_ADMIN_OK);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment