Synchronize with server problem in v5.0

Discussion of open issues, suggestions and bugs regarding database management and administration tools for MySQL
Post Reply
MarkBrock
Posts: 33
Joined: Fri 12 Dec 2008 12:31

Synchronize with server problem in v5.0

Post by MarkBrock » Tue 03 May 2011 09:44

I have many projects created and used in older versions and everything works fine. Now I updated from version 4.5 to 5.0 and all of my projects does not work correct any more. when trying to synchronize with server, I god several errors, which are only case sensitive issues. Executing the scripts works fine on the db, but dbForge Studio marks the case issues as an error and stops the synchronization with the server.
When I set "igrnore errors" in the project option the synchronization works, but this could not be the solution for it.

When mysql is not case sensitive, dbForge Studio also should ignore it.

Some examples:

Code: Select all

# the table
create table tab1 (
  ID INT(11) AUTO_INCREMENT,
  CNT FLOAT DEFAULT 0,
  TXT VARCHAR(255),
  PRIMARY KEY (ID)
)
ENGINE = INNODB
AUTO_INCREMENT = 1
CHARACTER SET utf8 COLLATE utf8_general_ci;
The following SQL statements are part or used in a stored procedure or trigger:

case 1:

Code: Select all

select id, txt from tab1;
This works!

case 2:

Code: Select all

select t1.id, t1.txt from tab1 t1;
This produces 2 errors on synchronization, which says "t1.id" and "t1.txt" does not exists in that context

Code: Select all

select t1.ID, t1.TXT from tab1 t1;
This solves the error message.

But both versions works fine on the db.

So I think when using aliases as table names for the field selection this will cause the problem.

It also affects the OLD and NEW aliases in triggers.

Viktor
Devart Team
Posts: 68
Joined: Thu 06 May 2010 08:12

Post by Viktor » Thu 05 May 2011 08:45

Thank you for the detail problem description. It was very helpful.
We have reproduced these issues. They will be fixed in the next build.

Viktor
Devart Team
Posts: 68
Joined: Thu 06 May 2010 08:12

Post by Viktor » Thu 19 May 2011 08:07

We have released a new build of dbForge Studio for MySQL with fixes. The latest build is 5.0.33. Please download it and check whether the problem persists.

MarkBrock
Posts: 33
Joined: Fri 12 Dec 2008 12:31

Post by MarkBrock » Thu 19 May 2011 08:51

problem seems to be solved, but one issue is left

Code: Select all

SELECT
    REPLACE(MID(c.column_type, 5, LENGTH(c.column_type) - 5), CHAR(39), '')
    INTO
      set_def
    FROM
      information_schema.`COLUMNS` c
    WHERE
      c.table_schema LIKE par_table_schema
      AND
      c.table_name LIKE par_table_name
      AND
      c.column_name LIKE par_column_name
      AND
      c.data_type LIKE 'set';
if you link to another schema the problem is still there. In the above sql it shows "information_schema" as "does not exists in the current context" and also all related fieldnames too.

Viktor
Devart Team
Posts: 68
Joined: Thu 06 May 2010 08:12

Post by Viktor » Thu 19 May 2011 10:41

if you link to another schema the problem is still there. In the above sql it shows "information_schema" as "does not exists in the current context" and also all related fieldnames too.
This problem occurs if the Load completions from database option is turned off.
Main menu -> Options ->Text Editor ->Code Completion => "Load completions from database"

MarkBrock
Posts: 33
Joined: Fri 12 Dec 2008 12:31

Post by MarkBrock » Thu 19 May 2011 10:50

this option is set to ON, but the problem is still there.

Sometimes on synchronize when open the script in the editor in which the error occures, it then says ALL FINE, but sometimes not.

Same, when BUILD the project it always gives the error.

The code example from above is part of a stored procedure/function.

Viktor
Devart Team
Posts: 68
Joined: Thu 06 May 2010 08:12

Post by Viktor » Thu 19 May 2011 11:05

this option is set to ON, but the problem is still there.

Sometimes on synchronize when open the script in the editor in which the error occures, it then says ALL FINE, but sometimes not.

Same, when BUILD the project it always gives the error.

The code example from above is part of a stored procedure/function.
Workaround:
To build the project successfully, a connection and at least one SQL document should be opened.

It will be fixed in one of the next builds.

brennan
Posts: 1
Joined: Tue 24 May 2011 16:50

Same deployment problem

Post by brennan » Tue 24 May 2011 20:14

I'm using dbForge for MySQL 5.0.33 and MySQL 5.1.48-community server.

When I try to do deploy my database the stored procedures that contain the following returns an error [The name 'xxx' does not exists in the current context'.]

CREATE TEMPORARY TABLE active_temp
SELECT entity.ENTITY_ID
FROM entity
WHERE entity.ACTIVE = 'Y';

CREATE TEMPORARY TABLE scope_active_temp
SELECT active_temp.ENTITY_ID
FROM active_temp
JOIN role
ON active_temp.ENTITY_ID = role.SUBJECT_ENTITY_ID;

Viktor
Devart Team
Posts: 68
Joined: Thu 06 May 2010 08:12

Post by Viktor » Wed 25 May 2011 07:38

to brennan
We've received your ticket, and from now on we'll communicate using the email user support system.

.jp
Devart Team
Posts: 345
Joined: Wed 09 Sep 2009 06:55
Location: devart

Post by .jp » Fri 17 Jun 2011 14:37

Problem with building a database project with disabled "Load completions from database" option is fixed in 5.0.36 build.

Post Reply