create view bug36670 as select ' MySQL Logout Profile Developer Zone Bugs Home View your bugs Report a bug Statistics Advanced search Saved searches Tags Bug 36670 MySQL Migration Toolkit Migrating Large Union Query Views SQL is truncated Submitted 12 May 17 53 Modified 12 May 18 27 Reporter Bryn Parrott Email Updates Status Open Category MySQL Migration Toolkit Severity S2 Serious Version 1 1 12 OS Microsoft Windows Assigned to Target Version Tags Migration Toolkit Migration of Views from SQL Server to MySQL Priority Internal order 0 View Add Comment Files Developer View Progress Log 12 May 17 53 Bryn Parrott Description Task Migrating a database from SQL Server 2005 to MySQL Community Edition When Migratioin Toolkit migrates Views it will write out an SQL script that contains the SQL text of the views but they are all commented out and require manual intervention to ensure that the intent of the view is translated correctly Thats fine however I have found that when a view consists of a large Union query with 5 select statements each consisting of 17 lines of SQL contained within that the text of the SQL statement copied from the SQL Server instance is truncated The truncation seems to occur anywhere even in the middle of a word or quoted string I have several such views in the source DB The view topmost in the file just had the last couple of lines chopped off It gets progressively worse as I go down the file reviewing and fixing up the SQL At first the issue seemed to affect the FROM clause in the select statement and left the Where clause following unaffected That is until the last one The bottom most view had approx 20 lines chopped off meaning that one whole segment of the union query went missing and I had to type it in manually This problem does not affect the smaller views which are interspersed in the file some in between the larger views How to repeat It will be a lot of work to repeat this 1 Create a large Union query in a SQL 2005 database Make sure this has lots of lines of code and several select statements within the Union Need to have several of these The DB on which I found this issue has 20 such views 2 Attempt to use the Migration toolkit to transfer the views into a MySQL database 5 0 x Save the script file it produces Look at the sql produced with comments and confirm that each large view is truncated to some degree If you need my files to attempt to reproduce well then we may have problems due to a they contain real client sensitive data and b the files are physically large Suggested fix looks like a buffer overflow condition possibly when writing out the converted SQL script or possibly when sucking it in from SQL server 12 May 18 19 Miguel Solorzano Thank you for the bug report Could you please provide a test case database so we can to attach it to our SQL Server Thanks in advance 12 May 18 27 Bryn Parrott Not so easy Please read read my comments at the end of the report The SQL 2005 database is 40 M in size so I cant email it to you and also it contains data confidential to my client Short story you are not getting this data 1995 2008 MySQL AB All rights reserved Online Shop Legal Privacy Policy Contact Us No Software Patents Portions of this website are copyright 2001 2002 The PHP Group Page generated in 0 268 sec using MySQL 5 1 23 rc log ' union select ' MySQL Logout Profile Developer Zone Bugs Home View your bugs Report a bug Statistics Advanced search Saved searches Tags Bug 36670 MySQL Migration Toolkit Migrating Large Union Query Views SQL is truncated Submitted 12 May 17 53 Modified 12 May 18 27 Reporter Bryn Parrott Email Updates Status Open Category MySQL Migration Toolkit Severity S2 Serious Version 1 1 12 OS Microsoft Windows Assigned to Target Version Tags Migration Toolkit Migration of Views from SQL Server to MySQL Priority Internal order 0 View Add Comment Files Developer View Progress Log 12 May 17 53 Bryn Parrott Description Task Migrating a database from SQL Server 2005 to MySQL Community Edition When Migratioin Toolkit migrates Views it will write out an SQL script that contains the SQL text of the views but they are all commented out and require manual intervention to ensure that the intent of the view is translated correctly Thats fine however I have found that when a view consists of a large Union query with 5 select statements each consisting of 17 lines of SQL contained within that the text of the SQL statement copied from the SQL Server instance is truncated The truncation seems to occur anywhere even in the middle of a word or quoted string I have several such views in the source DB The view topmost in the file just had the last couple of lines chopped off It gets progressively worse as I go down the file reviewing and fixing up the SQL At first the issue seemed to affect the FROM clause in the select statement and left the Where clause following unaffected That is until the last one The bottom most view had approx 20 lines chopped off meaning that one whole segment of the union query went missing and I had to type it in manually This problem does not affect the smaller views which are interspersed in the file some in between the larger views How to repeat It will be a lot of work to repeat this 1 Create a large Union query in a SQL 2005 database Make sure this has lots of lines of code and several select statements within the Union Need to have several of these The DB on which I found this issue has 20 such views 2 Attempt to use the Migration toolkit to transfer the views into a MySQL database 5 0 x Save the script file it produces Look at the sql produced with comments and confirm that each large view is truncated to some degree If you need my files to attempt to reproduce well then we may have problems due to a they contain real client sensitive data and b the files are physically large Suggested fix looks like a buffer overflow condition possibly when writing out the converted SQL script or possibly when sucking it in from SQL server 12 May 18 19 Miguel Solorzano Thank you for the bug report Could you please provide a test case database so we can to attach it to our SQL Server Thanks in advance 12 May 18 27 Bryn Parrott Not so easy Please read read my comments at the end of the report The SQL 2005 database is 40 M in size so I cant email it to you and also it contains data confidential to my client Short story you are not getting this data 1995 2008 MySQL AB All rights reserved Online Shop Legal Privacy Policy Contact Us No Software Patents Portions of this website are copyright 2001 2002 The PHP Group Page generated in 0 268 sec using MySQL 5 1 23 rc log ' union select ' MySQL Logout Profile Developer Zone Bugs Home View your bugs Report a bug Statistics Advanced search Saved searches Tags Bug 36670 MySQL Migration Toolkit Migrating Large Union Query Views SQL is truncated Submitted 12 May 17 53 Modified 12 May 18 27 Reporter Bryn Parrott Email Updates Status Open Category MySQL Migration Toolkit Severity S2 Serious Version 1 1 12 OS Microsoft Windows Assigned to Target Version Tags Migration Toolkit Migration of Views from SQL Server to MySQL Priority Internal order 0 View Add Comment Files Developer View Progress Log 12 May 17 53 Bryn Parrott Description Task Migrating a database from SQL Server 2005 to MySQL Community Edition When Migratioin Toolkit migrates Views it will write out an SQL script that contains the SQL text of the views but they are all commented out and require manual intervention to ensure that the intent of the view is translated correctly Thats fine however I have found that when a view consists of a large Union query with 5 select statements each consisting of 17 lines of SQL contained within that the text of the SQL statement copied from the SQL Server instance is truncated The truncation seems to occur anywhere even in the middle of a word or quoted string I have several such views in the source DB The view topmost in the file just had the last couple of lines chopped off It gets progressively worse as I go down the file reviewing and fixing up the SQL At first the issue seemed to affect the FROM clause in the select statement and left the Where clause following unaffected That is until the last one The bottom most view had approx 20 lines chopped off meaning that one whole segment of the union query went missing and I had to type it in manually This problem does not affect the smaller views which are interspersed in the file some in between the larger views How to repeat It will be a lot of work to repeat this 1 Create a large Union query in a SQL 2005 database Make sure this has lots of lines of code and several select statements within the Union Need to have several of these The DB on which I found this issue has 20 such views 2 Attempt to use the Migration toolkit to transfer the views into a MySQL database 5 0 x Save the script file it produces Look at the sql produced with comments and confirm that each large view is truncated to some degree If you need my files to attempt to reproduce well then we may have problems due to a they contain real client sensitive data and b the files are physically large Suggested fix looks like a buffer overflow condition possibly when writing out the converted SQL script or possibly when sucking it in from SQL server 12 May 18 19 Miguel Solorzano Thank you for the bug report Could you please provide a test case database so we can to attach it to our SQL Server Thanks in advance 12 May 18 27 Bryn Parrott Not so easy Please read read my comments at the end of the report The SQL 2005 database is 40 M in size so I cant email it to you and also it contains data confidential to my client Short story you are not getting this data 1995 2008 MySQL AB All rights reserved Online Shop Legal Privacy Policy Contact Us No Software Patents Portions of this website are copyright 2001 2002 The PHP Group Page generated in 0 268 sec using MySQL 5 1 23 rc log ' union select ' MySQL Logout Profile Developer Zone Bugs Home View your bugs Report a bug Statistics Advanced search Saved searches Tags Bug 36670 MySQL Migration Toolkit Migrating Large Union Query Views SQL is truncated Submitted 12 May 17 53 Modified 12 May 18 27 Reporter Bryn Parrott Email Updates Status Open Category MySQL Migration Toolkit Severity S2 Serious Version 1 1 12 OS Microsoft Windows Assigned to Target Version Tags Migration Toolkit Migration of Views from SQL Server to MySQL Priority Internal order 0 View Add Comment Files Developer View Progress Log 12 May 17 53 Bryn Parrott Description Task Migrating a database from SQL Server 2005 to MySQL Community Edition When Migratioin Toolkit migrates Views it will write out an SQL script that contains the SQL text of the views but they are all commented out and require manual intervention to ensure that the intent of the view is translated correctly Thats fine however I have found that when a view consists of a large Union query with 5 select statements each consisting of 17 lines of SQL contained within that the text of the SQL statement copied from the SQL Server instance is truncated The truncation seems to occur anywhere even in the middle of a word or quoted string I have several such views in the source DB The view topmost in the file just had the last couple of lines chopped off It gets progressively worse as I go down the file reviewing and fixing up the SQL At first the issue seemed to affect the FROM clause in the select statement and left the Where clause following unaffected That is until the last one The bottom most view had approx 20 lines chopped off meaning that one whole segment of the union query went missing and I had to type it in manually This problem does not affect the smaller views which are interspersed in the file some in between the larger views How to repeat It will be a lot of work to repeat this 1 Create a large Union query in a SQL 2005 database Make sure this has lots of lines of code and several select statements within the Union Need to have several of these The DB on which I found this issue has 20 such views 2 Attempt to use the Migration toolkit to transfer the views into a MySQL database 5 0 x Save the script file it produces Look at the sql produced with comments and confirm that each large view is truncated to some degree If you need my files to attempt to reproduce well then we may have problems due to a they contain real client sensitive data and b the files are physically large Suggested fix looks like a buffer overflow condition possibly when writing out the converted SQL script or possibly when sucking it in from SQL server 12 May 18 19 Miguel Solorzano Thank you for the bug report Could you please provide a test case database so we can to attach it to our SQL Server Thanks in advance 12 May 18 27 Bryn Parrott Not so easy Please read read my comments at the end of the report The SQL 2005 database is 40 M in size so I cant email it to you and also it contains data confidential to my client Short story you are not getting this data 1995 2008 MySQL AB All rights reserved Online Shop Legal Privacy Policy Contact Us No Software Patents Portions of this website are copyright 2001 2002 The PHP Group Page generated in 0 268 sec using MySQL 5 1 23 rc log ' union select 'dsfdsfdsfdsfdasfdsfsdfdsfdsafds';