Bug #59409 adding def.schema prefix within Query builder within msvs 2008 xsd
Submitted: 11 Jan 2011 1:20 Modified: 28 Jun 2011 15:16
Reporter: Chris Rokusek Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:6.3.4, 5.5.8 MySql OS:Microsoft Windows
Assigned to: Julio Casal CPU Architecture:Any
Tags: XSD

[11 Jan 2011 1:20] Chris Rokusek
Description:
From within the .xsd designer I drag a table from a MySql connection on the list and begin configure it. When I open the Advanced Query builder, The sql is changed from what was in the initial box

   select * from x;

to

   select * from def.schema.x

where schema is the actual schema and the problem is that I don't understand where the def prefix is coming from which causes the SQL to be invalid. 

Using MySql version 5.5.8, MySqlConnector 6.3.4, Visual Studio 2008, Windows 7 64. This same process was working fine on XP.

Any ideas?

How to repeat:
please see description.

Suggested fix:
Determine where the "def" would possibly be inserted from, offer workaround if there is one.
[25 Jan 2011 18:04] Valeriy Kravchuk
Please, check if the same problem happens with a newer version of Connector/Net, 6.3.6.
[26 Feb 2011 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[18 Jun 2011 12:48] Miguel Martin
Same problem with any MySQL conector version (even 6.4.1)
[18 Jun 2011 16:22] Miguel Martin
It disappeared in the following situation:

I was using a connection string saved in the settings of the app.
I went to one tableadapter of the dataset and to the properties of the tableadapter. There I changed the connection to "localhost". The program asked me to save the connection in app settings, I said yes, then it disapeared.
Then I changed again to previous saved connection string, deleted from settings the created connection string and still working fine.. Really strange behaviour..

I had other datasets in other projects of the solution. It disappeared on all the projects of the solution.
[19 Jun 2011 8:19] Miguel Martin
This is really incredible!
Shutdown the computer and appeared again..
[19 Jun 2011 9:55] Miguel Martin
Ok, discovered it has to do with the catalog: 

Go to vs2008."servers explorer".
Select a view of the database wich I created the conection.
Go to properties it appears, (READ ONLY all the properties):

Catalog: def                    <------ !!
Check Option: NONE
Definer: root@localhost
Definition: select(...)
Is Updatable: YES
Name: muestrasaretirar
Schema: schemaname              <------ !!
Security Type: DEFINER

Now 'Catalog=def' only appears in the properties of a view.
Before it also appeared the properties of a table also (Now in a table properties 'Catalog=""').
Now the query builder only adds "def.schemaname" when trying to add a view.

Tried to generate again the connection, to change the name of the connection, to change all the connections of the dataset. No way.
[28 Jun 2011 15:16] Julio Casal
Thank you for your bug report. This issue has already been fixed in the latest released version of that product, which you can download at

  http://www.mysql.com/downloads/

Fixed in 6.3.7+.