How to fix
-- missing source code error on Datagrip?
We will receive the below error when we try to extract the Stored Procedure DDL,
Here is an example of the error:
To avoid the error
-- missing source code:
Click on "Data Source Properties" (1 in the below image) -> Advanced (2 in the below image) -> Expert options (3 in the below image)
In the Expert options, We have the following two checkboxes,
- Introspect using JDBC metadata.
- Use SHOW CREATE for source code.
By default, "Use SHOW CREATE for source code" is selected, The explanation of that option is below,
Use the SHOW CREATE statement to generate the CREATE statement for an object source code. The source code for triggers and routines is broken in the 'information_schema' of MySQL (see Bug #66414). You can obtain correct sources by using SHOW CREATE. Note that the execution of this statement might be slow. For more details, see DBE-5060.
Now the solution to fix the issue,
Uncheck that box and then apply the new settings
The next step is to refresh the page,
Error is gone and DDL is visible,