To reproduce bug:
1. Add tables `ta` and `tb` to Table Wizard, provide default view.
2. Analyze `tb` table. Set `taid` field to be foreign key.
3. Add automatic relationship with base table field ta.id and related table field tb.taid.
4. In the default view created by Table Wizard try to add new field.

Comments

TonyK’s picture

Views 6.x-2.8

TonyK’s picture

Sorry, I didn't notice that my sql script had not attached to the original post. Here it is:

CREATE TABLE IF NOT EXISTS `ta` (
  `id` int(11) NOT NULL auto_increment,
  `value` varchar(256) collate utf8_unicode_ci NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ;

INSERT INTO `ta` (`id`, `value`) VALUES(1, 'ABC');
INSERT INTO `ta` (`id`, `value`) VALUES(2, 'Test');

CREATE TABLE IF NOT EXISTS `tb` (
  `taid` int(11) NOT NULL,
  `data` varchar(256) collate utf8_unicode_ci NOT NULL,
  `code` varchar(10) collate utf8_unicode_ci NOT NULL,
  UNIQUE KEY `taid` (`taid`,`code`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO `tb` (`taid`, `data`, `code`) VALUES(1, 'abcdef', 'C1');
INSERT INTO `tb` (`taid`, `data`, `code`) VALUES(1, '1111111111111111111111111111', 'C2');
INSERT INTO `tb` (`taid`, `data`, `code`) VALUES(2, '_', 'C1');
mikeryan’s picture

Status: Active » Fixed

Fixed, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.