Q:

mysqldump ignore table does not ignore view

I have a database with 1000 plus tables, when i export it using mysqldump, i use the --ignore-table= to get rid the table i don't want, everything exported fine, however when import the mysql, it say table not found at view part corresponding with the table that i ignored.
here is the sql part that causing error:
/*!50001 DROP TABLE IF EXISTS `v_aaa`*/;
/*!50001 DROP VIEW IF EXISTS `v_aaa`*/;
/*!50001 SET @saved_cs_client          = @@character_set_client */;
/*!50001 SET @saved_cs_results         = @@character_set_results */;
/*!50001 SET @saved_col_connection     = @@collation_connection */;
/*!50001 SET character_set_client      = utf8 */;
/*!50001 SET character_set_results     = utf8 */;
/*!50001 SET collation_connection      = utf8_general_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`ebusiness`@`%` SQL SECURITY DEFINER */
/*!50001 VIEW `v_aaa` AS (select `tb1`.`field1` AS `mycode`,`tb1`.`field2` AS `myname`,`tb1`.`limit` AS `mylimit` from tb1) */;
/*!50001 SET character_set_client      = @saved_cs_client */;
/*!50001 SET character_set_results     = @saved_cs_results */;
/*!50001 SET collation_connection      = @saved_col_connection */;

problem is the tb1 is on my ignore list and i get this error during import:
ERROR 1146 (42S02) at line 63036: Table 'db.tb1' doesn't exist

im dumping the database using:
 mysqldump  --user=root --password=**** --host=***.***.***.*** --single-transaction --ignore-table=tb1 --ignore-table=tb2 --ignore-table=tb3 dbxx > somefile.sql

any idea how to get rid the view code as well if the table is ignored to prevent this error?
UPDATE: is it possible for me to to loop into view's inside information_schema to check what table they are using, if the table of the view occur in ignore list, we just use --ignore-table= to ignore that view? using bash script maybe?

A:

The problem is that you have a view that references the table that you ignored. When you try to import the view, MySQL discovers that the view is incomplete because of the missing table.
The solution is to ignore the view as well when you dump the database.

