SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[SA 7.1.228 Pro] - Schema Compare (MySQL)

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[SA 7.1.228 Pro] - Schema Compare (MySQL)
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2165

Post [SA 7.1.228 Pro] - Schema Compare (MySQL) Reply with quote
The results of the schema comparison contained a strange character string.

What is this? Garbage got into retrieved code?

EDIT: that above was for tables. Stored procedure codes (apart from the keywords CREATE DEFINER... PROCEDURE schema_procname) entirely consist of similarly encoded "strings" (both the parameter list and the body).
Thu Nov 20, 2014 11:24 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Reply with quote
The link to the screenshot seems to be broken
Thu Nov 20, 2014 12:32 pm View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2165

Post Reply with quote
That's stranget. It works here. Could you try copy-pasting it into your browser, please?

http://s26.postimg.org/wx6k9ac8n/screenshot_2014_11_20_at_15_26_10.png
Thu Nov 20, 2014 12:35 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Reply with quote
Thank you, I will let them know.
Thu Nov 20, 2014 1:39 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Reply with quote
It looks like a problem with identifying column data type of the Comments column or reading it's context. Please execute the following "Tables" query I copied from SA settings and check if the output results appear normal. Please let us know if you spot something unusual

SELECT
t.TABLE_SCHEMA AS `Schema name`,
t.TABLE_NAME AS `Table name`,
'Table' AS `Target type`,
t.ENGINE AS `Engine`,
t.AUTO_INCREMENT AS `Auto increment`,
IF(t.AVG_ROW_LENGTH > 0, t.AVG_ROW_LENGTH, '') AS `Avg row length`,
t.TABLE_COMMENT as `Comment`,
IF(t.TABLE_COLLATION <> s.DEFAULT_COLLATION_NAME, t.TABLE_COLLATION, '') AS `Collation`,
IF(t.`CHECKSUM` IS NOT NULL, '1 ', '') AS `Checksum`,
UPPER(t.`ROW_FORMAT`) AS `Row format`,
IF(t.TABLE_TYPE = 'TEMPORARY', ' TEMPORARY ', '') AS `Temporary`,
t.CREATE_OPTIONS as `Check options`
FROM
information_schema.TABLES t
JOIN
information_schema.SCHEMATA s ON t.TABLE_SCHEMA = s.SCHEMA_NAME
WHERE
t.TABLE_TYPE IN ('BASE TABLE', 'TEMPORARY')
ORDER BY t.TABLE_NAME
Fri Nov 21, 2014 10:09 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Reply with quote
Does the query posted in the previous message return binary data?
Mon Nov 24, 2014 12:52 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2165

Post Reply with quote
I'm sorry, I couldn't reply earlier, had no access to the servers until now.

And yes, I can see binary results in Awg row length. All the rest seems to be pretty normal.
Mon Nov 24, 2014 8:33 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Reply with quote
Please make a correction in SA settings that will fix that issue.

Options - Schema Compare - MySQL - Schema Compare Queries for MySQL - Table - Query text

Code:
SELECT
   t.TABLE_SCHEMA  AS `Schema name`,
   t.TABLE_NAME    AS `Table name`,
   'Table'          AS `Target type`,
   t.ENGINE       AS `Engine`,
   t.AUTO_INCREMENT AS `Auto increment`,
   IF(t.AVG_ROW_LENGTH > 0, t.AVG_ROW_LENGTH, NULL) AS `Avg row length`,
   t.TABLE_COMMENT as `Comment`,
   IF(t.TABLE_COLLATION <> s.DEFAULT_COLLATION_NAME, t.TABLE_COLLATION, NULL) AS `Collation`,
   IF(t.`CHECKSUM` IS NOT NULL, '1 ', NULL) AS `Checksum`,
   UPPER(t.`ROW_FORMAT`) AS `Row format`,
   IF(t.TABLE_TYPE = 'TEMPORARY', ' TEMPORARY ', NULL) AS `Temporary`,
   t.CREATE_OPTIONS as `Check options`
FROM
   information_schema.TABLES t
JOIN
   information_schema.SCHEMATA s ON t.TABLE_SCHEMA = s.SCHEMA_NAME   
WHERE
   t.TABLE_TYPE IN ('BASE TABLE', 'TEMPORARY')
   AND ('$SCHEMA_NAME$' = '' OR t.TABLE_SCHEMA = '$SCHEMA_NAME$')
ORDER BY t.TABLE_NAME   



Options - Schema Compare - MySQL - Schema Compare Templates for MySQL - Table (CREATE) - Template text


Code:
CREATE $TEMPORARY$TABLE `$SCHEMA_NAME$`.`$OBJECT_NAME$`
(
   $,\n\t|COLUMN=COLUMN DEFINITION,PRIMARY KEY=PRIMARY KEY DEFINITION,UNIQUE KEY=UNIQUE KEY DEFINITION,FOREIGN KEY=FOREIGN KEY DEFINITION$
)$ENGINE {ENGINE}$$
  AUTO_INCREMENT = {AUTO INCREMENT}$$
  AVG_ROW_LENGTH = {AVG ROW LENGTH}$$
  COMMENT = '{COMMENT}'$$
  COLLATE = {COLLATION}$$
  CHECKSUM = {CHECKSUM}$$
  ROW_FORMAT = {ROW FORMAT}$$
  {TEMPORARY}$$
  {CREATE OPTIONS}$;

$\n\n|DML TRIGGER=TRIGGER (CREATE)$



Not completely sure if this this fix is compatible with 7.1.228, I couldn't test the fix, my test system is already running a more recent build, but I think it's worse trying. The fix was implemented in 7.1.237 internal build, which is currently considered a candidate for a new public beta release, slated for later this week.
Tue Nov 25, 2014 2:06 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2165

Post Reply with quote
After applying modifications I still get the garbage instead of normal code but this time on target server only. By the way, there aren't any indications which is which, it shows MySQL for both Source and Target and nothing else useful that could help me identify the server itself. Granted that they are of different versions (5.1.40 and 5.6.15) I guess the issue might be version dependent.
Tue Nov 25, 2014 6:48 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Reply with quote
Quote:
By the way, there aren't any indications which is which, it shows MySQL for both Source and Target


We are working on fixing this issue.
Wed Nov 26, 2014 12:17 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.