Force option is supposed to ignore the error, add a comment in the dump file and move on to the next object.
This doesnt happen for this particular function.
But the behaviour can be observed for "Views with missing tables" errors.
One the function has some syntax error.
But more importantly customer is unable to take a dump of the function even with --force.
Force option is supposed to ignore the error, add a comment in the dump file and move on to the next object.
This doesnt happen for this particular function.
But the behaviour can be observed for "Views with missing tables" errors.
Customer has few legacy functions.
One the function has some syntax error.
But more importantly customer is unable to take a dump of the function even with --force.
{code:java}
[mysql@x01gtdsdb2a mysqldump]$ mysqldump -uinstadm -p --no-data --routines --events --triggers --max-allowed-packet=100M --single-transaction --force --databases tdsdbsgowner > ddl_tdsdbsgowner.sql
Enter password:
mysqldump: Couldn't execute 'SHOW CREATE FUNCTION `FF1`': Failed to load routine tdsdbsgowner.FF1 (internal code -6). For more details, run SHOW WARNINGS (1457)
{code}
Force option is supposed to ignore the error, add a comment in the dump file and move on to the next object.
This doesnt happen for this particular function.
But the behaviour can be observed for "Views with missing tables" errors.
One the function has some syntax error.
But more importantly customer is unable to take a dump of the function even with --force.
{code:java}
[mysql@x01gtdsdb2a mysqldump]$ mysqldump -uinstadm -p --no-data --routines --events --triggers --max-allowed-packet=100M --single-transaction --force --databases tdsdbsgowner > ddl_tdsdbsgowner.sql
Enter password:
mysqldump: Couldn't execute 'SHOW CREATE FUNCTION `FF1`': Failed to load routine tdsdbsgowner.FF1 (internal code -6). For more details, run SHOW WARNINGS (1457)
{code}
Force option is supposed to ignore the error, add a comment in the dump file and move on to the next object.
This doesnt happen for this particular function.
But the behaviour can be observed for "Views with missing tables" errors.
Customer has few legacy functions.
One the function has some syntax error.
But more importantly customer is unable to take a dump of the function even with --force.
{code:java}
[mysql@x01gtdsdb2a mysqldump]$ mysqldump -uinstadm -p --no-data --routines --events --triggers --max-allowed-packet=100M --single-transaction --force --databases {database}> dump.sql
Enter password:
mysqldump: Couldn't execute 'SHOW CREATE FUNCTION `FF1`': Failed to load routine tdsdbsgowner.FF1 (internal code -6). For more details, run SHOW WARNINGS (1457)
{code}
Force option is supposed to ignore the error, add a comment in the dump file and move on to the next object.
This doesnt happen for this particular function.
But the behaviour can be observed for "Views with missing tables" errors.
One the function has some syntax error.
But more importantly customer is unable to take a dump of the function even with --force.
{code:java}
[mysql@x01gtdsdb2a mysqldump]$ mysqldump -uinstadm -p --no-data --routines --events --triggers --max-allowed-packet=100M --single-transaction --force --databases {database}> dump.sql
Enter password:
mysqldump: Couldn't execute 'SHOW CREATE FUNCTION `FF1`': Failed to load routine tdsdbsgowner.FF1 (internal code -6). For more details, run SHOW WARNINGS (1457)
{code}
Force option is supposed to ignore the error, add a comment in the dump file and move on to the next object.
This doesnt happen for this particular function.
But the behaviour can be observed for "Views with missing tables" errors.
Customer has few legacy functions.
One the function has some syntax error.
But more importantly customer is unable to take a dump of the function even with --force.
{code:java}
[mysql@x01gtdsdb2a mysqldump]$ mysqldump -uinstadm -p --no-data --routines --events --triggers --max-allowed-packet=100M --single-transaction --force --databases xxxx> dump.sql
Enter password:
mysqldump: Couldn't execute 'SHOW CREATE FUNCTION `ABC`': Failed to load routine xxxx.ABC (internal code -6). For more details, run SHOW WARNINGS (1457)
{code}
Force option is supposed to ignore the error, add a comment in the dump file and move on to the next object.
This doesnt happen for this particular function.
But the behaviour can be observed for "Views with missing tables" errors.
One the function has some syntax error.
But more importantly customer is unable to take a dump of the function even with --force.
{code:java}
[mysql@x01gtdsdb2a mysqldump]$ mysqldump -uinstadm -p --no-data --routines --events --triggers --max-allowed-packet=100M --single-transaction --force --databases xxxx> dump.sql
Enter password:
mysqldump: Couldn't execute 'SHOW CREATE FUNCTION `ABC`': Failed to load routine xxxx.ABC (internal code -6). For more details, run SHOW WARNINGS (1457)
{code}
Force option is supposed to ignore the error, add a comment in the dump file and move on to the next object.
This doesnt happen for this particular function.
But the behaviour can be observed for "Views with missing tables" errors.
Customer has few legacy functions.
One of the function has some syntax error.
But more importantly customer is unable to take a dump of the function even with --force.
{code:java}
[mysql@x01gtdsdb2a mysqldump]$ mysqldump -uinstadm -p --no-data --routines --events --triggers --max-allowed-packet=100M --single-transaction --force --databases xxxx> dump.sql
Enter password:
mysqldump: Couldn't execute 'SHOW CREATE FUNCTION `ABC`': Failed to load routine xxxx.ABC (internal code -6). For more details, run SHOW WARNINGS (1457)
{code}
Force option is supposed to ignore the error, add a comment in the dump file and move on to the next object.
This doesnt happen for this particular function.
But the behaviour can be observed for "Views with missing tables" errors.
One of the function has some syntax error.
But more importantly customer is unable to take a dump of the function even with --force.
{code:java}
[mysql@x01gtdsdb2a mysqldump]$ mysqldump -uinstadm -p --no-data --routines --events --triggers --max-allowed-packet=100M --single-transaction --force --databases xxxx> dump.sql
Enter password:
mysqldump: Couldn't execute 'SHOW CREATE FUNCTION `ABC`': Failed to load routine xxxx.ABC (internal code -6). For more details, run SHOW WARNINGS (1457)
{code}
Force option is supposed to ignore the error, add a comment in the dump file and move on to the next object.
This doesnt happen for this particular function.
But the behaviour can be observed for "Views with missing tables" errors.
Customer has few legacy functions.
One of the function has some syntax error.
But more importantly customer is unable to take a dump of the function even with --force.
Force option is supposed to ignore the error, add a comment in the dump file and move on to the next object.
This doesnt happen for this particular function.
But the behaviour can be observed for "Views with missing tables" errors.
Force option is supposed to ignore the error, add a comment in the dump file and move on to the next object.
This doesnt happen for this particular function.
But the behaviour can be observed for "Views with missing tables" errors.
Customer has few legacy functions.
One of the function has some syntax error.
But more importantly customer is unable to take a dump of the function even with --force.
Force option is supposed to ignore the error, add a comment in the dump file and move on to the next object.
This doesnt happen for this particular function.
But the behaviour can be observed for "Views with missing tables" errors.
I suppose it would be more consistent to treat events and triggers the same way during mariadb-dump too.
Daniel Black
added a comment - reproduced with:
MariaDB [mysql]> create function bob() returns int return 1;
MariaDB [mysql]> update proc set body= 'return no_such_var' where name = 'bob' ;
Query OK, 1 row affected (0.001 sec)
Rows matched: 1 Changed: 1 Warnings: 0
MariaDB [mysql]> show create function bob;
ERROR 1327 (42000): Undeclared variable: no_such_var
MariaDB [mysql]> select bob();
ERROR 1457 (HY000): Failed to load routine mysql.bob (internal code -6). For more details, run SHOW WARNINGS
MariaDB [mysql]> show warnings;
+ -------+------+------------------------------------------------------------------------------------------+
| Level | Code | Message |
+ -------+------+------------------------------------------------------------------------------------------+
| Error | 1327 | Undeclared variable: no_such_var |
| Error | 1457 | Failed to load routine mysql.bob (internal code -6). For more details, run SHOW WARNINGS |
+ -------+------+------------------------------------------------------------------------------------------+
2 rows in set (0.000 sec)
I suppose it would be more consistent to treat events and triggers the same way during mariadb-dump too.
It occurs to me we could just removing the validation of the function in SHOW CREATE FUNCTION? This would make it equivalent to triggers and events who's SHOW SQL doesn't validate the function.
Daniel Black
added a comment - It occurs to me we could just removing the validation of the function in SHOW CREATE FUNCTION ? This would make it equivalent to triggers and events who's SHOW SQL doesn't validate the function.
Any recommendation serg ?
danblack, I think just making --force to continue over errors should be enough here. If someone would want to include invalid routines into the dump it could be easily achieved by dumping mysql.proc and not using --routines
Sergei Golubchik
added a comment - danblack , I think just making --force to continue over errors should be enough here. If someone would want to include invalid routines into the dump it could be easily achieved by dumping mysql.proc and not using --routines
reproduced with:
Query OK, 1 row affected (0.001 sec)
ERROR 1327 (42000): Undeclared variable: no_such_var
MariaDB [mysql]> show warnings;
| Error | 1327 | Undeclared variable: no_such_var |
I suppose it would be more consistent to treat events and triggers the same way during mariadb-dump too.