forum.vmspython.org Forum Index forum.vmspython.org
Forum system
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

MySQL 5.1-23-RC ALTER TABLE problem

 
Post new topic   Reply to topic    forum.vmspython.org Forum Index -> MySQL for OpenVMS
View previous topic :: View next topic  
Author Message
David Kellerman



Joined: 19 Jun 2009
Posts: 1

PostPosted: Fri Jun 19, 2009 2:54 am    Post subject: MySQL 5.1-23-RC ALTER TABLE problem Reply with quote

Hi,

I've been using MySQL 5.1-23-RC for several months now with no problems, but I'm having problems using it with a new application (JAMWiki).

The database definitions have some circular FOREIGN KEY references, and the application uses ALTER TABLE commands to set these up. One of the tables ends up with a CONSTRAINT that has a bad table reference. (It looks like a temporary table name of some sort.)

Here's a stripped down test case that shows the problem:
Code:

CREATE TABLE jam_topic (
  topic_id INTEGER NOT NULL,
  current_version_id INTEGER,
  CONSTRAINT jam_p_topic PRIMARY KEY (topic_id)
);

CREATE TABLE jam_topic_version (
  topic_version_id INTEGER NOT NULL,
  topic_id INTEGER NOT NULL,
  CONSTRAINT jam_p_topic_ver PRIMARY KEY (topic_version_id),
  CONSTRAINT jam_f_topicv_topic FOREIGN KEY (topic_id) REFERENCES jam_topic(topic_id)
);


The output from a SHOW CREATE TABLE (cleaned up a bit):
Code:

CREATE TABLE "jam_topic_version" (
  "topic_version_id" int(11) NOT NULL,
  "topic_id" int(11) NOT NULL,
  PRIMARY KEY ("topic_version_id"),
  KEY "jam_f_topicv_topic" ("topic_id"),
  CONSTRAINT "jam_f_topicv_topic" FOREIGN KEY ("topic_id")
    REFERENCES "_sql2-20e0043c-209" ("topic_id")
)
CREATE TABLE "jam_topic" (
  "topic_id" int(11) NOT NULL,
  "current_version_id" int(11) DEFAULT NULL,
  PRIMARY
KEY ("topic_id"),
  KEY "jam_f_topic_topicv" ("current_version_id"),
  CONSTRAINT "jam_f_topic_topicv" FOREIGN KEY ("current_version_id")
    REFERENCES "jam_topic_version" ("topic_version_id")
)


Can someone tell me if this a known problem with the 5.1-23-RC release, or if I have something messed up in my configuration?

Thanks,
David
Back to top
View user's profile Send private message
jfp



Joined: 12 Jul 2004
Posts: 618

PostPosted: Thu Jun 25, 2009 7:29 pm    Post subject: Reply with quote

David,

thanks for the reproducer, we plan to release a new version, so we will check if the problem still exits.

JF
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vmspython.org Forum Index -> MySQL for OpenVMS All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group