Back to the month index |
Back to the list index
|
Chris Anderson (chrisa@alwan.com)
Tue, 22 Apr 1997 11:35:43 -0500
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: Juergen Fuhrmann: "Re: [mSQL] callback on table modification... or not?"
- Previous message: Oscar Santos: "[mSQL] Automatic field identifier?"
- Next in thread: Kirt Johnson: "Re: [mSQL] Non unique value in update?"
- Reply: Kirt Johnson: "Re: [mSQL] Non unique value in update?"
Message-Id: <3.0.1.32.19970422113543.00738fa4@venus> Date: Tue, 22 Apr 1997 11:35:43 -0500 From: Chris Anderson <chrisa@alwan.com> Subject: Re: [mSQL] Non unique value in update?This is a bug/feature. In normal sql a update can be done to the key
column even with the same value. I would like to see this fixed. But for
now I just check to see if the key has changed and run one update and if
not run another. Hack!
Maybe I will look into changing the C code and post the fix. But....
Maybe the author of mSQL will find time to fix it.
At 10:07 AM 4/21/97 -0700, you wrote:
>I was getting similar problems. I'd create a unique index on a char(32)
>not null field, and many of my table rows would become inaccessible.
>Trying to re-insert them failed due to a 'Non-unique value...' error like
>you describe, but mSQL couldn't find a match to my WHERE clause when I tried
>to update or delete them instead. Catch 22!
>
>non-unique indeces work fine, of course, but it would be nice to be able
>to use unique ones rather than do the uniqueness checking inside my own
>code.
>
> kirt johnson
>
>(I'm running 2.0b5 on IRIX 6.2 - no patches)
>
>On Sat, 19 Apr 1997, Tauren Mills wrote:
>
>> This command used to work in msql 1.x but it is giving this error with
msql 2.x:
>>
>> mSQL > update products set prod_id = 'BIGDOGMA' where prod_id='BIGDOGMA'\g
>> ERROR : Non unique value for unique index
>>
>> Here is the version info:
>>
>> Version Details :-
>> msqladmin version 2.0 Beta 5 Pre2
>> mSQL server version 2.0 Beta 5 Pre2
>> mSQL protocol version 22
>> mSQL connection Localhost via UNIX socket
>> Target platform SunOS-4.1.4-Sparc
>>
>> Configuration Details :-
>> Default config file
/easystreet/vdomains/es2vd136/msql2/msql.conf
>> TCP socket 4333
>> UNIX socket
/easystreet/vdomains/es2vd136/msql2/msql2.sock
>> mSQL user es2vd136
>> Admin user es2vd136
>> Install directory /easystreet/vdomains/es2vd136/msql2
>> PID file location
/easystreet/vdomains/es2vd136/msql2/msql2d.pid
>>
>> This product and the "products" table are defined like this:
>>
>> create table products (
>> prod_id char(15) not null,
>> cat_id char(10) not null,
>> description char(255),
>> short_desc char(50) not null,
>> sizes int,
>> colors int,
>> retail real,
>> price real,
>> sale_id char(10),
>> create_date int,
>> mod_date int,
>> graphic_root char(15),
>> active_flag int,
>> filepath char(100),
>> num_opt_groups int,
>> sort_order int
>> )
>> \p\g
>>
>> CREATE UNIQUE INDEX products_idx ON products (
>> prod_id
>> )
>> \p\g
>>
>> insert into products(prod_id, cat_id, description, short_desc, sizes,
colors, retail,
>> price, sale_id, create_date, mod_date, graphic_root, active_flag,
filepath, sort_order)
>> values('BIGDOGMA', '1111111111', 'Infinite Rider on the Big Dogma
CD', 'Infinite
>> Rider on the Big Dogma',32,1,16.95,16.95,'0000000000', 1000, 1000,
'bigdogma',
>> 1,'/products/bigdogma.html',1)\p\g
>>
>> I want to be able to update all sorts of fields at once, including the
prod_id field. If
>> the prod_id field is changed, it works, but if the prod_id field stays
the same but
>> other fields have changed, it fails. Any suggestions?
>>
>> Thanks,
>> Tauren
>>
>> * Groovee Creatives * Tauren Mills *
>> * tauren@groovee.com * PO BOX 1072 *
>> * http://www.groovee.com/ * Portland, OR 97207 *
>> * ftp://ftp.groovee.com/pub/groovee/ * TEL: 503.768.9392 *
>> *CGI*Java*ActiveX*NSAPI*ISAPI*SQL*C/C++*Shockwave*XTRAs*VB*Sound*
>>
>> --------------------------------------------------------------------------
>> To remove yourself from the Mini SQL mailing list send a message containing
>> "unsubscribe" to >> "unsubscribe" to msql-list-request@bunyip.com. Send a message containing
>> "info msql-list" to majordomo@bunyip.com for info on monthly archives of
>> the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!
>>
>
> kirt johnson info engineer
> www.kirt.com www.nvolve.com
>
>--------------------------------------------------------------------------
>To remove yourself from the Mini SQL mailing list send a message containing
>"unsubscribe" to >"unsubscribe" to msql-list-request@bunyip.com. Send a message containing
>"info msql-list" to majordomo@bunyip.com for info on monthly archives of
>the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!
>
>
--------------------------------------------------------------------------
To remove yourself from the Mini SQL mailing list send a message containing
"unsubscribe" to "unsubscribe" to msql-list-request@bunyip.com. Send a message containing
"info msql-list" to majordomo@bunyip.com for info on monthly archives of
the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!
- Next message: Juergen Fuhrmann: "Re: [mSQL] callback on table modification... or not?"
- Previous message: Oscar Santos: "[mSQL] Automatic field identifier?"
- Next in thread: Kirt Johnson: "Re: [mSQL] Non unique value in update?"
- Reply: Kirt Johnson: "Re: [mSQL] Non unique value in update?"