Bug #24379 | slash in table name isn't caught. | ||
---|---|---|---|
Submitted: | 17 Nov 2006 0:36 | Modified: | 22 Nov 2006 13:37 |
Reporter: | Carl Karsten (Silver Quality Contributor) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Migration Toolkit | Severity: | S3 (Non-critical) |
Version: | 1.1.5 rc | OS: | Windows (win2k) |
Assigned to: | CPU Architecture: | Any |
[17 Nov 2006 0:36]
Carl Karsten
[22 Nov 2006 13:37]
Michael G. Zinner
All / are now changed to _ during the migration process. Further, one can use the shell for more flexible renaming of objects. On the Manual Editing page, press F4 to access the shell. Paste this script into the shell and press enter. -- ----------------------------------------------------------------------------- -- @brief Renames tables -- -- Renames the target tables based on the given find- and -- replace strings. -- -- @param findStr substring to find, please see Lua string.gsub() -- for details -- @param replaceStr replacement string, please see Lua string.gsub() -- for details -- -- @return nothing -- ----------------------------------------------------------------------------- function renameTables(findStr, replaceStr) local i, j local schemas = grtV.getGlobal("/migration/targetCatalog/schemata") for j = 1, grtV.getn(schemas) do -- get views reference tables = schemas[j].tables; -- loop over all tables for i= 1, grtV.getn(tables) do tables[i].name= string.gsub(grtV.toLua(tables[i].name), findStr, replaceStr) end end -- re-create SQL statements local catalog= grtV.getGlobal("/migration/targetCatalog") local options= grtV.getGlobal("/migration/objectCreationParams") TransformationMysql:generateSqlCreateStatements({catalog, options}) end Execute renameTables("/T", "_T") to perform the rename command. Please notice that you have to select a different filter to update the Migrated Objects listing on the Manual Editing page.