Bug 18144 - Recreate table with compound primary key generate wrong sql command
Recreate table with compound primary key generate wrong sql command
Status: RESOLVED FIXED
Product: db
Classification: Unclassified
Component: Code
6.x
PC Windows ME/2000
: P3 (vote)
: 7.2
Assigned To: Jaroslav Havlin
issues@db
:
: 15412 35308 48693 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2001-11-28 11:53 UTC by Richard Malaschitz
Modified: 2012-06-05 06:04 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Malaschitz 2001-11-28 11:53:22 UTC
[MSSQL 2000]
Recreate table with compound primary key generate wrong code:
---------------
create table mytable (
    col1 int primary key,
    col2 int primary key
)
---------------
Proper code is (for most of SQL servers):
---------------
create table mytable (
    col1 int,
    col2 int,
    primary key (col1,col2)
)
---------------
Comment 1 Radko Najman 2001-12-04 10:24:23 UTC
Will be investigated for new module based on MDR. There is no way to
fix it nice in the current implementation.
Comment 2 Quality Engineering 2003-06-30 17:16:18 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.
Comment 3 Quality Engineering 2003-06-30 17:17:30 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.
Comment 4 Jan Chalupa 2003-10-30 12:06:41 UTC
A mistakenly closed RESOLVED LATER/REMIND issue. Reopening.
Comment 5 Radko Najman 2004-02-03 17:14:49 UTC
Grab/Recreate Table action wasn't designed to generate advanced
commands as shown. There is no support for compound keys or indexes so
there is no way how to fix it with current infrastructure.
Changing to ENHANCEMENT.
Comment 6 Radko Najman 2004-02-03 17:16:47 UTC
*** Issue 35308 has been marked as a duplicate of this issue. ***
Comment 7 Radko Najman 2004-02-03 17:22:24 UTC
*** Issue 15412 has been marked as a duplicate of this issue. ***
Comment 8 Radko Najman 2004-09-17 14:04:30 UTC
*** Issue 48693 has been marked as a duplicate of this issue. ***
Comment 9 dmladek 2004-09-17 14:48:58 UTC
Do you still think it is more enhancement then the defect?
So many dups have been reported so far, then it might bejust only
enhancement...
Comment 10 Radko Najman 2004-09-20 14:46:04 UTC
The functionality wasn't design for these commands so from this point
of view it is probably an enhancement :-)
Comment 11 dmladek 2004-09-21 06:34:23 UTC
If you think so.... There's no absolute true, and each one has his/her
one :-)

Let me explain my point of view

But if an architect designs house and there are 2 rooms without doors
inside it, would you call it rather badly/buggy designed house or
you'll be happy with it and just say: Alright it's just a question of
an enhancement to get into those rooms.

IMHO it is missing part of design of this feature "Recreate Table"

Iinsist this issue woudl be a defect.
Comment 12 dmladek 2004-09-21 06:56:21 UTC
Another case would be

if the house would be designed wihout those 2 rooms. There were just
one big area (with entry in it:-).
Then you cold require the enhacement to build 2 rooms in this big area...
And if there are no doors into those 2 rooms, then again you woudl
call it bug, not another enhancement...


The same paralery you could watch in our problem of feature "Recreate Tab"
Comment 13 Petr Jiricka 2004-09-21 08:33:58 UTC
So what's the behavior that the user sees? Some error from the driver?
Or something else? As a short term fix, could we at least alert the
user that this case is not supported?
Comment 14 Radko Najman 2004-09-21 09:30:56 UTC
The user can see a dialog with SQL command that will be executed.
There is a possibility to modify the command.
Comment 15 Andrei Badea 2005-10-10 14:12:17 UTC
This bug can't be cleanly fixed in the current architecture. We can detect the
situation and warn the user, but I'm not sure it is worth it. Will be addressed
in a future version of the Database Explorer.
Comment 16 Andrei Badea 2007-02-15 17:08:43 UTC
Too late to be fixed for 6.0.
Comment 17 Roman Mostyka 2008-07-15 12:49:25 UTC
This issue isn't solved in NetBeans 6.5. So changed product version.
Comment 18 David Vancouvering 2008-11-12 17:31:17 UTC
What we want to do is use a tool like DDLUtils or some functionality from MySQL Workbench.  Let's see if we can do this
in the next release.  It would be fixed as part of an overall enhancement to allow you to generate DDL from a schema
(rather than current "grab structure"/"recreate table" model).
Comment 19 Jiri Rechtacek 2009-02-10 15:30:26 UTC
Reassigned to new owner.
Comment 20 Jaroslav Havlin 2012-06-04 14:09:43 UTC
http://hg.netbeans.org/core-main/rev/9a7e2fdd6d4e
Fixed. Added a workaround to the current architecture.
Please verify. Thanks.
Comment 21 Quality Engineering 2012-06-05 06:04:41 UTC
Integrated into 'main-golden', will be available in build *201206050001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/9a7e2fdd6d4e
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #18144: Recreate table with compound primary key generate wrong sql command


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo