Bug #24814 Cant insert foreign key for table with fullstop character

Submitted: 5 Dec 2006 5:05 Modified: 5 Dec 2006 22:29
Reporter: Jared S (Silver Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Query Browser Severity:S2 (Serious)
Version:1.2.6 BETA OS:Windows (WinXP)
Assigned to: CPU Architecture:Any
Tags: constraint, foriegn key

[5 Dec 2006 5:05] Jared S
Description:
Hi.  I am having problem inserting foreign key for particular table with fullstop in table name.

How to repeat:
-- 1. run following script to generate offending db
-- 2. then from QA select live\res.sql\edit table
-- 3. then select foreign keys->add->table=res.ver,field=res.sql.[idversion]

CREATE DATABASE IF NOT EXISTS live;
USE live;

DROP TABLE IF EXISTS `res.sql`;
CREATE TABLE `res.sql` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `idversion` int(11) NOT NULL,
  `ftp` varchar(64) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='InnoDB free: 6144 kB';

DROP TABLE IF EXISTS `res.ver`;
CREATE TABLE `res.ver` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `description` varchar(32) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Suggested fix:
Ensure that when adding foreign keys to table with full stop in it, that it works.
[5 Dec 2006 5:27] Jared S
Error when adding FKEY

Attachment: error1.GIF (image/gif, text), 11.38 KiB.

[5 Dec 2006 10:56] MySQL Verification Team
Thank you for the bug report. I was unable to repeat creating the tables
with your script. Please see:

http://dev.mysql.com/doc/refman/5.0/en/legal-names.html
[5 Dec 2006 22:29] Jared S
Ok - you dont support tables with fullstops, bug is closed then.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.