This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
If you create the travel sample using the MySQL support, the resulting database has no foreign keys. This is because we don't specify the table type as InnoDB, and the default storage engine for MySQL, MyISAM does not support foreign keys. This is probably an issue for 'vir' and 'sample' as well.
Can this be fixed by posting the sample databases on the update center, like Sakila ? That way the tutorials can work. I think there's a Hibernate tutorial that isn't working
If this is breaking tutorials then perhaps this is a P1. I don't think the right solution is to post the samples to the UC. It's an easy fix - just need to use the InnoDB engine. Roman, what do you think?
I think what the issue is ... if the storage engine specified in the user's MySQL installation is ISAM then the trip table has foreign keys for personid and triptypeid However, if the storage engine is MyISAM then there won't be any foreign keys in the sample databases.
shucks I meant to say... "if the storage engine specified in the user's MySQL installation is InnoDB then the trip table has foreign keys for personid and triptypeid"
I agree that if this breaks tutorial, then it should be P1. Or tutorial shouldn't be available for the customers. I also agree that it is bad idea to post samples to UC since it looks like step back. And it doesn't help customers to follow tutorial since after they get plugin from UC they will have the same problem, so anyway this problem should be fixed. There 2 questions: 1) How difficult to fix this issue and why posting the sample databases on the update center, like Sakila, will help? 2) Does it really break anything?
Yes, it breaks things, and pushing to the update center wouldn't help without other changes to the db.mysql code base. It's easy to fix, I'll take care of it today. Roman, I'll let you make the final call if this is a P1 (I'll make it at P2) and I'll go ahead and push it to main and you can tell me the process to get it to the RC branch. Thanks for catching this, John, I didn't know there were issues with tutorials, but it makes sense. No foreign keys breaks the codegen code.
David, here are the rules for pushing changes into RC branch: http://wiki.netbeans.org/NB65Rules But it is a real showstopper if it breaks things, so if we can push only P1, we should make it P1. By the way, I think this is P1, if it can prevent customers to follow tutorial, since it will look like we supply product and tutorial which are incompatible.
Marking as showstopper
267b66533a99
Integrated into 'main-golden', will be available in build *200810160201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/267b66533a99 User: David Van Couvering <davidvc@netbeans.org> Log: #149696: MySQL travel sample database has no foreign keys
I can't verify this issue because of issue #150416. But I tried with previous build (200810140201) and tables had foreign keys (see attachment).
Created attachment 72011 [details] Screenshot of created keys.
By the way, sakila DB was created with this build without foreign keys.
Can somebody look at this issue? As you can see in my comments I was able to create "sample" DB with foreign keys with build 200810140201 and "sakila" DB, but without foreign keys. As you also can see in my comments in the issue #150422, I also was able to create "sakila" DB with MyISAM engine and again without foreign keys on the build with the fix for this issue. So can anybody verify this issue or tell me where I'm wrong? As I understand build 200810140201 doesn't contain fix for this issue, so I shouldn't be able to create DB with foreign keys, but I was successful in this. So probably this issue isn't valid for me, so anybody else verify this issue if it is valid for him/her?
OK, I eventually was able to reproduce this issue with RC1, but everything works fine with IDE built from fresh sources. Can we add this fix to the RC build?
Or add "65fixes1-candidate" status whiteboard if it's too late to have it in RC1. But I think that it will be better to have the fix in release.
Or set target to RC2.
Hi, Roman, I'm very confused. I fixed this in the trunk and did all the necessary steps to get this into the RC build, but I thought it was QEs job to actually integrate into the RC branch. Are you going to do that? Also, just to clarify: you can create Sakila with MyISAM because it turns off foreign key checks. I didn't add that to the other samples because I was unaware of the issue. I have in my sandbox a fix that turns off foreign key checks for the other samples, and I am in the process of testing it, and will check into trunk. It's a low-risk fix, so if you want you can integrate that into RC branch too. So to summarize: - Foreign keys now work with sample databases if you have InnoDB available - If you don't have InnoDB available, Sakila will work (without foreign keys) but the other samples will fail because they have foreign key checks turned on - I am seeing if I can fix the other samples by disabling foreign key checks, and if this works I will check into the trunk - I believe it is safe to put the disabling foreign key checks fix into the RC build, but I leave it to QE to make the final call - Please clarify who is supposed to integrate fixes into the RC branch - I thought it was QE that did this.
Transplanted to release65 clone as changeset ba17b00c4ec9. I am running a clean build and test and then will push tomorrow morning.
Pushed to release65 branch
David, thanks for the transplantation. We definitely need this fix for the release. And for the future, QE isn't responsible for any integration, developed by somebody else. But anyway, now we have this fix for next milestone and this is definitely very good, thanks for the hard work.