Bug #36209 multi bugs in reverse and parsing of a mysql5.1 star schema
Submitted: 18 Apr 2008 19:19 Modified: 8 May 2008 14:35
Reporter: Damien Mangin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.0.19 SE OS:Windows (XP Pro SP2)
Assigned to: CPU Architecture:Any

[18 Apr 2008 19:19] Damien Mangin
Description:
Hi,

As an early adopter of the MySQL 5.1 features, we gave with Stephane VAROQUI from MySQL PS  team  a unfortunate look at the promising MySQL Workbench. I join you seperate sql of our dataware house schema, triggers and routines. may that can help on complicated schemas :-) 

- Case sensitive tables with same name are droped (the DB is on a linux box)
- Views are marked as tables  
- "File => Import => Reverse ingeneer Mysql Create Script Script" blocked in infinite loop (after the "DIM_Offre_copy" table) : the WB process keeped running in the background at 99% CPU, and we were unable to exit properly :-)

- "Plugin => Catalogs => Copy tables list to clipboard" on a schema AFTER having created a "relationship using existing columns" crashed with a "memory cannot be read" message (application closed by itself)

- ... as you can see, we experimented several crashes :-) an option to save the connections, ... before crashes would be a must have to avoid recreating them 10 times :-)))

Regards,

Damien
  

How to repeat:
Please see the description field
[23 Apr 2008 8:30] Johannes Taxacher
could you please post a bug-report for each problem and provide a more detailed description on each of them. maybe you could also post the scripts/mwb-files that cause the problems (you can attach them as private so that only we have access to it).

thanks in advance
[25 Apr 2008 10:30] Damien Mangin
Hi,

I just sent you the implied script.
The main problem is that I'm unable to import this script in the workbench ... Is it because one of the tables heavily uses partitioning ?

Thank's a lot,

regard,

Damien
[25 Apr 2008 11:42] Valeriy Kravchuk
I was able to verify at least this:

"- "File => Import => Reverse ingeneer Mysql Create Script Script" blocked in infinite loop
(after the "DIM_Offre_copy" table) : the WB process keeped running in the background at
99% CPU, and we were unable to exit properly :-)"
[29 Apr 2008 11:13] Sergei Tkachenko
Fixes for incorrect cutting of auxiliary comments & for infinite loop during rev-eng are
ready & will go in release 5.0.22.
[29 Apr 2008 12:47] Damien Mangin
Hi,

thank's a lot for your answer :-)

- Case sensitive tables with same name are droped (the DB is on a linux
box)

==> The problem is that the mysql server is case-sensitive (my linux box), whereas WB (winXP) is not ...

So let's imagine a simple sql script (mysqldump):
DROP TABLE IF EXISTS my_table;
CREATE TABLE my_table (...);
DROP TABLE IF EXISTS MY_TABLE;
CREATE TABLE MY_TABLE (...);

==> only MY_TABLE is created, whereas my_table is created then dropped in the schema

(in my script, the real table names are DIM_ExamCt VS DIM_Examct)

I don't know if that's a real bug : it could be considered as a linux/windows incompatibility ...

- Views are marked as tables : I can't even remember what it stands for :-) please forgive me for that ...

- When I tried to rev-eng the same script I sent you, I had the following error :

Unable to translate bytes (E8) at index 23226 from specified code page to Unicode

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Text.DecoderFallbackException: Unable to translate bytes [E8] at index 23226 from specified code page to Unicode.
   at System.Text.DecoderExceptionFallbackBuffer.Throw(Byte[] bytesUnknown, Int32 index)
   at System.Text.DecoderExceptionFallbackBuffer.Fallback(Byte[] bytesUnknown, Int32 index)
   at System.Text.DecoderFallbackBuffer.InternalFallback(Byte[] bytes, Byte* pBytes)
   at System.Text.UTF8Encoding.FallbackInvalidByteSequence(Byte* pSrc, Int32 ch, DecoderFallbackBuffer fallback)
   at System.Text.UTF8Encoding.GetCharCount(Byte* bytes, Int32 count, DecoderNLS baseDecoder)
   at System.String.CreateStringFromEncoding(Byte* bytes, Int32 byteLength, Encoding encoding)
   at System.Text.UTF8Encoding.GetString(Byte[] bytes, Int32 index, Int32 count)
   at System.Text.Encoding.GetString(Byte[] bytes)
   at System.String.CreateString(SByte* value, Int32 startIndex, Int32 length, Encoding enc)
   at System.String..ctor(SByte* value, Int32 startIndex, Int32 length, Encoding enc)
   at MySQL.Grt.GrtUtil.CharToString(SByte* str)
   at MySQL.GUI.Workbench.Plugins.Db.Db_plugin.generate_ddl_script()
   at MySQL.GUI.Workbench.Plugins.Db.WBPluginDbRevEngPages.InitGeneratedScriptPage()
   at MySQL.GUI.Workbench.Plugins.WizardPlugin.InitializeActivePage()
   at MySQL.GUI.Workbench.Plugins.WizardPlugin.UpdateAfterPageProcessing(String errMsg)
   at MySQL.GUI.Workbench.Plugins.WizardPlugin.RestoreControlsState(String errMsg)
   at MySQL.GUI.Workbench.Plugins.WizardPlugin.GoToNextPage()
   at MySQL.GUI.Workbench.Plugins.WizardPlugin.btnNext_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
MySQLWorkbench
    Assembly Version: 5.0.19.3067
    Win32 Version: 5.0.19.3067
    CodeBase: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20SE/MySQLWorkbench.exe
----------------------------------------
wb.wr
    Assembly Version: 0.0.0.0
    Win32 Version: 
    CodeBase: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20SE/wb.wr.DLL
----------------------------------------
grt.wr
    Assembly Version: 0.0.0.0
    Win32 Version: 
    CodeBase: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20SE/grt.wr.DLL
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
MySQLCsUtilities
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20SE/MySQLCsUtilities.DLL
----------------------------------------
msvcm80
    Assembly Version: 8.0.50727.1433
    Win32 Version: 8.00.50727.1433
    CodeBase: file:///C:/WINDOWS/WinSxS/x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.1433_x-ww_5cf844d2/msvcm80.dll
----------------------------------------
MySQLGrtShell
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20SE/MySQLGrtShell.EXE
----------------------------------------
WeifenLuo.WinFormsUI.Docking
    Assembly Version: 2.2.3026.40768
    Win32 Version: 2.2.0.0
    CodeBase: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20SE/WeifenLuo.WinFormsUI.Docking.DLL
----------------------------------------
MySQLWorkbenchEditors
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20SE/MySQLWorkbenchEditors.DLL
----------------------------------------
Aga.Controls
    Assembly Version: 1.6.0.0
    Win32 Version: 1.6.0.0
    CodeBase: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20SE/Aga.Controls.DLL
----------------------------------------
grt.helpers.be
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20SE/grt.helpers.be.DLL
----------------------------------------
db.wbp.fe
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20SE/db.wbp.fe.DLL
----------------------------------------
db.wbp.wr
    Assembly Version: 0.0.0.0
    Win32 Version: 
    CodeBase: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20SE/db.wbp.wr.DLL
----------------------------------------
grt.db.wr
    Assembly Version: 0.0.0.0
    Win32 Version: 
    CodeBase: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20SE/grt.db.wr.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

==> I supposed this is due to the UTF-8 problem you mentionned to me earlier, but how can I avoid that ?

Thank's a lot for your time,

Bests regards,

Damien
[4 May 2008 19:09] Alfredo Kojima
The problem with copy/paste crash has been fixed and will be working in the next release.
[7 May 2008 10:10] Sergei Tkachenko
Made catalog object names comparison case-sensitive by default (later case-sensitivity will be defined by one of rev-eng parameters). That will fix "Case sensitive tables with same name are droped (the DB is on a linux box)". Changes will go in release 5.0.22.
Please close the bug-report & recheck if all described problems are addressed in forthcoming 5.0.22 version. If any problems left, then open new bug-report(s), one bug-report for every bug.
[8 May 2008 13:30] Sergei Tkachenko
As to non UTF8 characters that appear during rev-eng from DBMS.

In the definition of view named `FE_SI_CLIENTS`.`VIEW_ADH_KDP_NEW` there are literals containing non UTF8 characters. The only workaround I see currently is to rewrite those literals so they would use only UTF8 symbols,

e.g. change from
_latin1'Premiиre'
to
convert(_utf8'Première' using latin1)
[8 May 2008 14:35] Damien Mangin
Hi,

Thnak's a lot for your answers, I close the bug :-)
I'll reopne a new one if something goes wrong with 5.0.22 ...

Regards,

Damien