Bugs in v2.10.68.1

Discussion of open issues, suggestions and bugs regarding database management and administration tools for MySQL
Post Reply
spatar
Posts: 8
Joined: Thu 04 Oct 2007 08:16

Bugs in v2.10.68.1

Post by spatar » Thu 04 Oct 2007 08:24

I use MyDevStudio v2.10.68.1 (russian edition) but I also have license for english edition.
MySQL server version: 5.0.32-Debian_7etch1-log Debian etch distribution.

I found some bugs:

1. Can't display more than 1 constraint for a table in the object tree.

2. Can't display SQL code for a view created using mysql console.

Create view in mysql console:

Code: Select all

create view test_user as select * from mysql.user;
When edit this view in MyDevStudio it shows code:

Code: Select all

CREATE 
	ALGORITHM = UNDEFINED
VIEW test.test_user
AS
;
3. When edit table it looses option "on update current_timestamp" for timestamp column.

Create table in mysql console:

Code: Select all

create table test (
ts timestamp not null default current_timestamp on update current_timestamp
);
When edit this table in MyDevStudio it becomes:

Code: Select all

CREATE TABLE test.test (
  ts TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP
)
ENGINE = MYISAM
CHARACTER SET utf8 COLLATE utf8_general_ci;
4. Can't edit comment for an InnoDB-table.

5. Can't edit list of united tables for a MERGE-table.

spatar
Posts: 8
Joined: Thu 04 Oct 2007 08:16

Post by spatar » Thu 04 Oct 2007 13:49

There's also problem with creating triggers with symbol ";" inside trigger body. MySQL console has special command "delimiter" for changing command delimiter in SQL script, but MyDevStudio doesn't support it:

Code: Select all

create table delete_log (
	tab_name varchar(100),
	record_id int unsigned
);

create table test (
	test_id int unsigned,
	data varchar(100)
);

delimiter //
create trigger tad_test
after delete on test
for each row
begin
	if old.data is not null then
		insert into delete_log values ('test', old.test_id);
	end if;
end;
//

delimiter ;
This code will produce error:

Code: Select all

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'delimiter //
create trigger tad_test
after delete on test
for each row
begin' at line 1
MyDevStudio treats "delimiter" as SQL statement which is not.

Duke
Devart Team
Posts: 476
Joined: Fri 29 Oct 2004 09:25

Post by Duke » Fri 05 Oct 2007 06:57

1. Can't display more than 1 constraint for a table in the object tree.
Primary and foreign keys are displayed under Constraints node. What constraints do you mean?
2. Can't display SQL code for a view created using MySQL console.
We'll fix it in the next build.
3. When edit table it looses option "on update current_timestamp" for timestamp column.
We'll fix it in the next build.
4. Can't edit comment for an InnoDB-table.
We knowingly disabled comment editing for InnoDb tables because it's automatically filled by server.
5. Can't edit list of united tables for a MERGE-table.
We plan to implement editor for MERGE table in the next version.
MySQL console has special command "delimiter" for changing command delimiter in SQL script, but MyDevStudio doesn't support it
We'll support delimiter command in the next version.

Alexz
Devart Team
Posts: 165
Joined: Wed 10 Aug 2005 08:30

Post by Alexz » Fri 05 Oct 2007 09:05

2. Can't display SQL code for a view created using MySQL console.
Maybe you don't have privilege to show view text. In the next build we'll show the error message in this case.
3. When edit table it looses option "on update current_timestamp" for timestamp column.
Unfortunately, MySQL metadata doesn't contain such information. In the new version of MyDeveloper we'll try to parse the create table text to retrieve this option.

spatar
Posts: 8
Joined: Thu 04 Oct 2007 08:16

Post by spatar » Fri 05 Oct 2007 13:01

1. Can't display more than 1 constraint for a table in the object tree.
Primary and foreign keys are displayed under Constraints node. What constraints do you mean?
I mean foreign keys.

Code: Select all

create table test1(
	c1 int not null,
	primary key(c1)
)
engine=InnoDB;

create table test2(
	c2 int not null,
	primary key(c2)
)
engine=InnoDB;;

create table test3(
	c1 int not null,
	c2 int not null,
	constraint fk_test3__test1 foreign key (c1) references test1 (c1),
	constraint fk_test3__test2 foreign key (c2) references test2 (c2)
)
engine=InnoDB;
It shows only 1 of 2 foreign keys:

www.pichost.ru/out.php/i4752_1.gif

2. Can't display SQL code for a view created using MySQL console.
Maybe you don't have privilege to show view text. In the next build we'll show the error message in this case.
It seems it isn't MyDevStudio bug.
When I logged as root@localhost and have all grants on *.*, I still can't see view_definition from information_schema.VIEWS for views of other definers. But on other hand I can see view text using "show create view". Something is wrong in MySQL security model! :?
I'd be super if your studio could analyze "show create view" :P


And I have two bugs more... :)

1. It seems you've bug in supporting of bigint auto_increment columns:

Code: Select all

create table test(
	c1 bigint unsigned not null auto_increment,
	primary key (c1)
);

insert into test values (200710000000000001);
And select this big number:

Code: Select all

select * from test
Will produce exception:

Code: Select all

System.OverflowException: Value was either too large or too small for an Int32.
   at System.Decimal.ToInt32(Decimal d)
   at System.Convert.ToInt32(Decimal value)
   at System.Decimal.System.IConvertible.ToInt32(IFormatProvider provider)
   at System.Convert.ToInt32(Object value)
   at System.Data.Common.Int32Storage.Set(Int32 record, Object value)
   at System.Data.DataColumn.set_Item(Int32 record, Object value)Couldn't store  in c1 Column.  Expected type is Int32.
This error appears only in case c1 is auto_increment column.


2. Wrong type detection of the expression with string function:

Code: Select all

select concat(1, 2)
It treats result as BLOB and there's no button to view its contents:

www.pichost.ru/out.php/i4758_2.gif

I look forward for changes in the next release.
Thank you very much!!!

Alexz
Devart Team
Posts: 165
Joined: Wed 10 Aug 2005 08:30

Post by Alexz » Fri 12 Oct 2007 12:13

Can't display more than 1 constraint for a table in the object tree.
We have fixed this problem. The fix will be available in the next build.
I'd be super if your studio could analyze "show create view"
Possibly we'll implement this functionality in the future versions. But in some case "show view" is not granted to user.
1. It seems you've bug in supporting of bigint auto_increment columns
We'll fix this problem in the next build.
2. Wrong type detection of the expression with string function:
We cannot reproduce this bug in the final build MyDeveloper 2.10.71.

spatar
Posts: 8
Joined: Thu 04 Oct 2007 08:16

Post by spatar » Thu 18 Oct 2007 11:06

2. Wrong type detection of the expression with string function:
We cannot reproduce this bug in the final build MyDeveloper 2.10.71.
I checked in newer version (2.10.71.1) and it is really fixed :)

Post Reply