@@ -347,10 +347,14 @@ public function actionDump()
347347 // dump tables with data
348348 $ command = CliHelper::getMysqlCommand ('mysqldump ' , $ db );
349349 $ command ->addArg ('--no-tablespaces ' );
350+ $ command ->addArg ('--opt ' );
350351
351- $ noDataTables = explode (', ' , $ this ->noDataTables );
352- foreach ($ noDataTables as $ table ) {
353- $ command ->addArg ('--ignore-table ' , $ opts ['db ' ] . '. ' . $ table );
352+ if ($ this ->noDataTables ) {
353+ $ noDataTables = explode (', ' , $ this ->noDataTables );
354+
355+ foreach ($ noDataTables as $ table ) {
356+ $ command ->addArg ('--ignore-table ' , $ opts ['db ' ] . '. ' . $ table );
357+ }
354358 }
355359 $ command ->addArg ($ opts ['db ' ]);
356360 $ command ->addArg (' > ' , '' , false );
@@ -365,11 +369,12 @@ public function actionDump()
365369 }
366370
367371
368- if ($ noDataTables ) {
372+ if ($ this -> noDataTables ) {
369373 // dump tables without data
370374 $ commandNoData = CliHelper::getMysqlCommand ('mysqldump ' , $ db );
371375 $ commandNoData ->addArg ('--no-tablespaces ' );
372376 $ commandNoData ->addArg ('--no-data ' );
377+ $ commandNoData ->addArg ('--opt ' );
373378 $ commandNoData ->addArg ($ opts ['db ' ]);
374379
375380 foreach ($ noDataTables as $ table ) {
0 commit comments