WebDB-App / app

Efficient Database IDE
https://webdb.app
GNU Affero General Public License v3.0
185 stars 7 forks source link

Error loading database because there is an error in mysql procedure #44

Closed herliansyah closed 1 month ago

herliansyah commented 1 month ago

Error loading database because there is an error in mysql procedure

This is the error log from docker logs:

webdb-1 | 3306 sales show create procedure maxmemoryused webdb-1 | This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason: webdb-1 | TypeError: Cannot read properties of undefined (reading 'Create Procedure') webdb-1 | at MySQL.getComplexes (file:///usr/src/app/src/wrapper/mysql.js:239:27) webdb-1 | at process.processTicksAndRejections (node:internal/process/task_queues:105:5) webdb-1 | at async file:///usr/src/app/src/endpoint/server/controller.js:66:23 webdb-1 | TypeError: Cannot read properties of undefined (reading 'Create Procedure') webdb-1 | at MySQL.getComplexes (file:///usr/src/app/src/wrapper/mysql.js:239:27) webdb-1 | at process.processTicksAndRejections (node:internal/process/task_queues:105:5) webdb-1 | at async file:///usr/src/app/src/endpoint/server/controller.js:66:23 webdb-1 | Exiting WebDB

aleluff commented 1 month ago

Hello, can you send me the db structure and the broken procedure

herliansyah commented 1 month ago

on my mysql server there is a database with mysql procedure error and if i open it the error looks like this:

SHOW CREATE PROCEDURE `sales`.`MaxMemoryUsed`;
/* SQL Error (1457): Failed to load routine sales.MaxMemoryUsed. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6) */

when i open the database with other mysql db management like heidisql and other..error only show when i click the prcedure but the database still load normally, but if i open database with WebDB-App the database opening stuck.

aleluff commented 1 month ago

Often it' cause by an upgrade of the mysql server Can you try to export from the old version and import into the new

aleluff commented 1 month ago

In the same time I will try to fix the bug

aleluff commented 1 month ago

It's pushed now, available in 15 min

herliansyah commented 1 month ago

OK, thanks for the update..now the error is gone and the database can be opened normally