Bug #22002 line-lenght "Edit View"
Submitted: 4 Sep 2006 16:07 Modified: 11 Sep 2006 13:46
Reporter: Leon van der Ree Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Administrator Severity:S3 (Non-critical)
Version:1.2.2 beta OS:Microsoft Windows (Windows XP)
Assigned to: Mike Lischke CPU Architecture:Any
Tags: Edit View, line length

[4 Sep 2006 16:07] Leon van der Ree
Description:
The length of the line in edit view is to short.

Because no new-line characters are stored, you get a very long line if you want to view/edit your stored view. This line is longer then the text-field can hold per line.

The scrollbar now does appear on the bottom of the text-field (I think this wasn't the case in the previous beta), but I still can't see the end of the line.

Only giving an enter in the line helps to get the complete edit-command back (in two or more lines)

How to repeat:
have a view defined like:

CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=`user`@`%` SQL SECURITY DEFINER VIEW `overview` AS select `assignment_products`.`id` AS `id`,`assignment`.`agent_id` AS `agent_id`,`assignment`.`eta` AS `eta`,`assignment`.`eta_date` AS `eta_date`,`assignment`.`vessel_id` AS `vessel_id`,`assignment_products`.`quantity` AS `quantity`,`assignment_products`.`product_id` AS `product_id`,
`assignment_products`.`file` AS `file`,
`assignment`.`berth_id` AS `berth_id`,
`assignment_products`.`client_id` AS `client_id`,
`assignment_products`.`last_edited_date` AS `last_edited_date` 
from (`assignment` join `assignment_products`) 
where (`assignment_products`.`assignment_id` = `assignment`.`id`)

Suggested fix:
store new-line characters,

automaticly insert new-line characters when showing the view-editor (E.G. a comma "," and commands like "SELECT" "FROM" "WHERE" etc),

or let the line lenght of the edit-text-field be longer
[4 Sep 2006 19:05] MySQL Verification Team
Thank you for the bug report. You have reported as server bug, however
I guess is a gui-tool instead? Query Browser?. Could you please provide
the table definition too.

Thanks in advance.
[4 Sep 2006 19:23] Leon van der Ree
How strange,

that wasn't me who placed it under the views categorie, I see the change in my mailbox, but I don't know who've done this. I changed it back to the  MySQL Administrator category (where I originaly had placed it under...)

The table definitions are:

CREATE TABLE `assignment` (
  `id` bigint(20) unsigned NOT NULL auto_increment,
  `file` varchar(10) NOT NULL,
  `vessel_id` int(10) unsigned NOT NULL,
  `agent_id` int(10) unsigned NOT NULL,
  `berth_id` int(10) unsigned NOT NULL,
  `eta` varchar(20) NOT NULL,
  `eta_date` date default NULL,
  `previous_eta` varchar(20) default NULL,
  `previous_eta_date` date default NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `file` (`file`),
  KEY `vessel_id` (`vessel_id`),
  KEY `agent_id` (`agent_id`),
  KEY `berth_id` (`berth_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

CREATE TABLE `assignment_products` (
  `id` bigint(20) unsigned NOT NULL auto_increment,
  `assignment_id` bigint(20) unsigned NOT NULL,
  `file` varchar(10) NOT NULL,
  `subject` varchar(100) NOT NULL,
  `client_id` int(10) unsigned NOT NULL,
  `product_id` int(10) unsigned NOT NULL,
  `quantity` double unsigned NOT NULL,
  `closed` enum('false','true') NOT NULL default 'false',
  `flokstra` enum('false','true') NOT NULL default 'false',
  `creation_date` datetime NOT NULL,
  `created_by_user_id` tinyint(3) unsigned NOT NULL,
  `last_edited_date` datetime NOT NULL,
  `last_edited_user_id` tinyint(4) unsigned NOT NULL,
  `locked_date` datetime NOT NULL,
  `locked_by_user_id` tinyint(3) unsigned default NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `file` (`file`),
  KEY `assignment_id` (`assignment_id`),
  KEY `product_id` (`product_id`),
  KEY `client_id` (`client_id`),
  KEY `last_edited_user_id` (`last_edited_user_id`),
  KEY `created_by_user_id` (`created_by_user_id`),
  KEY `locked_by_user_id` (`locked_by_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

ps. I might also have found two bugs in the .Net connector, I've post them at the normal .Net forum, but should I post possible bugs also at this bug forum when I'm not sure if it is me who is wrong?

It are post
http://forums.mysql.com/read.php?38,114013,114013#msg-114013
bug with setting values after insert with UpdatedRowSource  
and
http://forums.mysql.com/read.php?38,108238,114044#msg-114044
old bug possible returned in alpha connector
[11 Sep 2006 13:46] Mike Lischke
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html
[11 Sep 2006 13:47] Mike Lischke
Leon, please open new bug reports for the other bugs. If they aren't real bugs then we'll close the reports with a proper remark.