when a multi-table rename fails, mariadb tries to roll back the rename by doing more renames. these renames trigger table discovery, which fails, leaving the rename in a partially undone state.
see CLX-159 for the repro.
discovery calls TABLE_SHARE::init_from_sql_statement_string, and at the bottom of that function, thd->is_error() is checked, but it was already true at the top of the function due to the fact that the rename failed.
i confirmed with Sergei Golubchik that it's a bug. he said to use a Turn_errors_to_warnings_handler and provided a patch (which works), but i don't know error handling well enough in mariadb to stand behind the patch myself.