Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have a single-tenant setup of MySQL databases; i.e. a more or less identical schema instance for each client.

When I'm tasked with modifying the code of stored routines, I use MySQL Workbench. After some time I usually find myself having code tabs with similar or identical code for several distinct database schemas.

How do I know to what schema a certain stored routine tab belongs?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Actually, there's no schema associated with a certain code tab. All tabs use the active schema. There's already a feature request for a schema-per-tab feature.

Update: you meant object editors and indeed there's no indication to which schema they belong. Please file a feature request to get this into MySQL Workbench (http://bugs.mysql.com).

share|improve this answer
    
Not sure I understand. I just tested again. If I pull up two tabs from different schemas, modify the routine code and click Apply, they will try to modify their respective database of origin. –  Gruber Aug 13 '13 at 12:58
    
I was only refering to code editors, not object editors or result sets. The latter 2 have their own storage of the associated schema. –  Mike Lischke Aug 13 '13 at 13:07
add comment

AFAIK, there is no straightforward way of checking from what schema a code tab originated in MySQL Workbench and this leads to confusion.

One workaround I've found is to make some code change (which you later will have to undo), so that you can click the Apply button. Then you will be presented with a code preview window. In that preview, you will see the schema's name in the top DROP PROCEDURE statement. Click Cancel and undo your code changes.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.