Re: Introducing hidden row having duplicated primary key

2001-11-13 Thread Martin MOKREJ
On Tue, 13 Nov 2001, Gerald Clark wrote: Looks correct to me. What do you think is the problem? 2 rows were affected by the replace. One row was deleted, and one was inserted, Both rows had a value of 'test' for column 'Tab'. Cool, thanks to Jeremy Zawodny and you, now I know even more

Re: Introducing hidden row having duplicated primary key

2001-11-13 Thread Jeremy Zawodny
On Tue, Nov 13, 2001 at 12:45:17PM -0800, Jeremy Zawodny wrote: On Tue, Nov 13, 2001 at 08:53:09PM +0100, Martin MOKREJS wrote: Hello, I think I've found a bug. Just by playing with REPLACE and INSERT, the following happened. I'm including full log, demonstrating that I don't

Re: Introducing hidden row having duplicated primary key

2001-11-13 Thread Jeremy Zawodny
On Tue, Nov 13, 2001 at 10:04:22PM +0100, Martin MOKREJS wrote: On Tue, 13 Nov 2001, Gerald Clark wrote: Looks correct to me. What do you think is the problem? 2 rows were affected by the replace. One row was deleted, and one was inserted, Both rows had a value of 'test' for column

RE: Introducing hidden row having duplicated primary key

2001-11-13 Thread Quentin Bennett
-Original Message- From: Martin MOKREJ [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 14 November 2001 10:04 a.m. To: Gerald Clark Cc: [EMAIL PROTECTED] Subject: Re: Introducing hidden row having duplicated primary key On Tue, 13 Nov 2001, Gerald Clark wrote: Looks correct to me. What do

how to auto_decrement a primary key?

2001-11-12 Thread yilmaz
, and it has a primary key, say pk. since pk is auto incrementing , whenever a new article is added it will increment by one.However, if i delete an article ( a row) it will not decrement. So when i want to display them five by five, i will have trouble, because some numbers do not exist. In oracle

RE: how to auto_decrement a primary key?

2001-11-12 Thread Don Read
the subject and contents of articles, and it has a primary key, say pk. since pk is auto incrementing , whenever a new article is added it will increment by one.However, if i delete an article ( a row) it will not decrement. So when i want to display them five by five, i will have trouble

primary key based on unique value for two columns

2001-11-12 Thread Brendin
I would like to have a table that has a primary key defined on a combination of two columns in the table. In other words a unique key based upon the values in two columns. I don't think I am able to do this in mysql. I think you can only have a primary key on one column

RE: primary key based on unique value for two columns

2001-11-12 Thread Rick Emery
Yes, you can have multi-column keys. see the manual, para. 6.5.3 CREATE TABLE Syntax -Original Message- From: Brendin [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 12:37 PM To: [EMAIL PROTECTED] Subject: primary key based on unique value for two columns I would like

Re: primary key based on unique value for two columns

2001-11-12 Thread Bill Adams
Brendin wrote: I would like to have a table that has a primary key defined on a combination of two columns in the table. In other words a unique key based upon the values in two columns. I don't think I am able to do this in mysql. I think you can only have a primary key on one column

RE: primary key based on unique value for two columns

2001-11-12 Thread Daniel Las
Hi You are wrong. Just try for example: create table test( pk1 int not null, pk2 int not null, primary key(pk1,pk2) ); Regards Daniel £aœ e-direct Polska sp. z o.o

RE: primary key based on unique value for two columns

2001-11-12 Thread Carsten H. Pedersen
I would like to have a table that has a primary key defined on a combination of two columns in the table. In other words a unique key based upon the values in two columns. I don't think I am able to do this in mysql. I think you can only have a primary key on one column

RE: primary key based on unique value for two columns

2001-11-12 Thread Jonathan Hilgeman
You can't use a primary key for that, but you CAN make a unique two-column key: ALTER TABLE MyTable ADD UNIQUE MyNewIndex (Column1,Column2) - Jonathan -Original Message- From: Brendin [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 10:37 AM To: [EMAIL PROTECTED] Subject

RE: primary key based on unique value for two columns

2001-11-12 Thread Brendin
Will this relate the primary keys to one another or just create primary keys on the columns. Ie: Create table test (column1 int(11) not null, column2 int(11) not null, primary key (column1, column2) ) Then could you... Insert into test values (1,2) Insert into test values (1,3) Note

RE: primary key based on unique value for two columns

2001-11-12 Thread Brendin
This will work thanks... That's what I want a unique key based on two columns. -Original Message- From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 12:09 PM To: 'Brendin'; [EMAIL PROTECTED] Subject: RE: primary key based on unique value for two

Re: primary key based on unique value for two columns

2001-11-12 Thread primej
sure you can CREATE TABLE xx (field1 INT NOT NULL,field2 INT NOT NULL,PRIMARY KEY (field1,field2)) and you have table xx with unique key in two fields hand primoz - Original Message - From: Brendin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 12, 2001 7:37 PM Subject

RE: primary key based on unique value for two columns

2001-11-12 Thread Jonathan Hilgeman
I have not tested this with the primary key - my previous suggestion went off the logic in my head at the time (most likely not a good thing, since I'm tired right now), but I have a feeling Bill here is probably correct if he says it's possible with the primary key as well. I stand corrected

Re: bad practice to have a primary key field whose value changes?

2001-10-31 Thread Bennett Haselton
At 02:32 PM 10/30/2001 -0700, Steve Meyers wrote: What would be ideal would be to use auto-incremented numeric fields as primary key fields, and then have a special field in each table designated as the user-friendly field. That way, when you want to view the contents of a table

RE: bad practice to have a primary key field whose value changes?

2001-10-30 Thread Johnson, Gregert
]] Sent: Tuesday, October 30, 2001 3:11 PM To: [EMAIL PROTECTED] Subject:bad practice to have a primary key field whose value changes? I'm creating a database where one of the tables stores data about news Web sites

Re: bad practice to have a primary key field whose value changes?

2001-10-30 Thread Steve Meyers
On Tue, 2001-10-30 at 13:10, Bennett Haselton wrote: I'm creating a database where one of the tables stores data about news Web sites, and I'm using the URL of the site as a primary key field. This field value might change occasionally. I'm wondering if this is bad practice, especially

RE: Using ALTER to modify type of a Primary Key; URGENT

2001-10-26 Thread Don Read
On 26-Oct-2001 Tim Evans wrote: I have inherited a database built by someone else who was apparently very stingy. :-) A primary key was set to 'tinyint(4)' limiting the number of records to 128. I've tried: alter table my_data modify phyid mediumint unsigned DEFAULT 0; ...but got

Re: Using ALTER to modify type of a Primary Key; URGENT

2001-10-26 Thread Aleksandar Bradaric
Hi, A primary key was set to 'tinyint(4)' limiting the number of records to 128. I've tried: alter table my_data modify phyid mediumint unsigned DEFAULT 0; ERROR 1121: Column 'phyid' is used with UNIQUE or INDEX but is not defined as NOT NULL Try: alter table my_data modify phyid

Using ALTER to modify type of a Primary Key; URGENT

2001-10-25 Thread Tim Evans
I have inherited a database built by someone else who was apparently very stingy. :-) A primary key was set to 'tinyint(4)' limiting the number of records to 128. I've tried: alter table my_data modify phyid mediumint unsigned DEFAULT 0; ...but got: ERROR 1121: Column 'phyid' is used

Primary Key Issue while importing BIN Logs

2001-09-22 Thread Michael McConnell
I'm having a difficult time synchronizing my Master and Slave Servers. I've been doing this using MySQL Binary Logs, where the Master rotates the logs at 1 hour times, and the slave downloads it and imports it. What happens why I try to pipe the binlog into mysql is that it reports and error

Please help - primary key column's auto_increment feature is going wild

2001-09-05 Thread David Potter
Hello, I have a mysql database with a table called cust. The primary key column custid is of type int and has the auto_increment feature which has been working perfectly for months. The auto_increment feature set numbers as high as 21700.But suddenly, it started over, setting numbers like

Re: Primary Key pairs and auto-incrementing

2001-08-30 Thread Carl Troein
On 29-Aug-01, Paul DuBois wrote: Create a single PRIMARY KEY that consists of the two columns chapter and section, and make section an AUTO_INCREMENT column. When you insert rows, set chapter to the proper chapter number and section to NULL. This will cause MySQL to generate independent

Primary Key pairs and auto-incrementing

2001-08-29 Thread Ferrara, Joseph C
I want to create a table with two Primary Keys. The first key is a category field, and the second is auto-incremented. Example: Key 1=Chapter name, Key 2 =section number. For example, (Chapter1, 1) (Chapter1, 2) (Chapter1, 3) then with a new Cheaper, I want to restart the auto-incremented

RE: Primary Key pairs and auto-incrementing

2001-08-29 Thread Chris Bolt
-incremented field back to 1 (Chapter2, 1) (Chapter2, 2). How do I get the auto-incrementer to restart with each new chapter? Try this: mysql CREATE TABLE test (chapter INT NOT NULL, section INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (chapter, section)); Query OK, 0 rows affected (0.00 sec) mysql INSERT

Re: Primary Key pairs and auto-incrementing

2001-08-29 Thread Paul DuBois
Cheaper, I want to restart the auto-incremented field back to 1 (Chapter2, 1) (Chapter2, 2). How do I get the auto-incrementer to restart with each new chapter? Create a single PRIMARY KEY that consists of the two columns chapter and section, and make section an AUTO_INCREMENT column. When you

[Bug in InnoDB]: updating primary key of 8000-byte row corrupts table!

2001-08-26 Thread Heikki Tuuri
Hi! A serious bug has been found in the big BLOB and TEXT support of InnoDB. If you update the primary key of a row whose length is 8000 bytes, then the table becomes corrupt. Also the tablespace may become corrupt. Note that also a REPLACE can internally be handled as an update. A fixed

Re: JDBC Primary key error

2001-08-25 Thread Paul Schreiber
Also, I'm seeing this in the logfile: java.lang.NullPointerException WOApplication 'Newsie': Exception occurred while handling request: com.webobjects.foundation.NSForwardException [com.webobjects.jdbcadaptor.JDBCAdaptorException] null Paul (in case you're wondering, yes, i did get mysql

JDBC Primary key error

2001-08-25 Thread Paul Schreiber
(in case you're wondering, yes, i did get mysql working argh.) info: WO5, Mac OS X 10.0.4, MySQL 3.23.32, mm.mysql JDBC adaptor 2.0.6.1 I get this error: java.lang.IllegalStateException: Adaptor com.webobjects.jdbcadaptor.JDBCAdaptor@b7ad3 failed to provide new primary keys for entity

Re: multiple-(BLOB)column, primary key for pre-v 3.23 db

2001-06-19 Thread Javier Armendáriz
way for do the same in a better way? Thanks Javier Armendáriz [EMAIL PROTECTED] Brian Warn wrote: Hello, I want to use two text columns as my primary key. From the DuBois book, I see that I cannot do this since my v. 3.22.32 tables are ISAM, and BLOB and TEXT columns cannot be indexed

Re: multiple-(BLOB)column, primary key for pre-v 3.23 db

2001-06-19 Thread Jeremy Zawodny
On Tue, Jun 19, 2001 at 08:48:56AM -0700, Brian Warn wrote: Hello, I want to use two text columns as my primary key. From the DuBois book, I see that I cannot do this since my v. 3.22.32 tables are ISAM, and BLOB and TEXT columns cannot be indexed. Besides upgrading to v. 3.23

Replication and primary key autoinc issue

2001-06-14 Thread Fabien Balageas
Hello! I have two databases that i want to replicate: each database should contain the same information. That's why i have set a circular replication relation. All works fine, except that one of the table is filled in real-time; this table has a primary key with autoinc type. When a new record

RE: Replication and primary key autoinc issue

2001-06-14 Thread Warren van der Merwe
- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] ]On Behalf Of Fabien Balageas Sent: 14 June 2001 13:59 To: '[EMAIL PROTECTED]' Subject: Replication and primary key autoinc issue Hello! I have two databases that i want to replicate: each database should contain the same information

Primary key not unique on Innodb tables.

2001-04-25 Thread BAUMEISTER Alexandre
', volume int(10) unsigned NOT NULL default '0', PRIMARY KEY (symbole,id), KEY idx_id (id) ) TYPE=Innobase; As you can see, (symbole,id) is the primary key. But : mysql select * from livequote_last_PAR where symbole='1rPFTE' order by id desc

Re: Primary key not unique on Innodb tables.

2001-04-25 Thread Heikki Tuuri
KEY (symbole,id), KEY idx_id (id) ) TYPE=Innobase; As you can see, (symbole,id) is the primary key. But : mysql select * from livequote_last_PAR where symbole='1rPFTE' order by id desc; +-+---+-+--++ | symbole | id| date

Re[2]: Primary key not unique on Innodb tables.

2001-04-25 Thread BAUMEISTER Alexandre
Heikki, I did the downgrade to Mysql-3.23.36. I don't have this problem with 3.23.36 ! Alex. HT check by other queries whether it is the table which contains a HT duplicate row, or if the SELECT gives a wrong answer. HT Check what HT SELECT * FROM ... WHERE symbole='1rPFTE'; HT

Re[2]: Primary key not unique on Innodb tables.

2001-04-25 Thread BAUMEISTER Alexandre
Heikki, Another exemple : mysql select * from livequote_last_PAR where symbole='1rPFTE' order by id desc; +-+---+-+--++ | symbole | id| date| last | volume | +-+---+-+--++ |

Re[2]: Primary key not unique on Innodb tables.

2001-04-25 Thread BAUMEISTER Alexandre
Heikki, HT check by other queries whether it is the table which contains a HT duplicate row, or if the SELECT gives a wrong answer. HT Check what HT SELECT * FROM ... WHERE symbole='1rPFTE'; HT returns. Really strange : mysql select * from livequote_last_PAR where symbole='1rPFTE' order

Help modify existing column to be Primary Key

2001-04-25 Thread Sean . Tibbetts
I used Access (sorry) to develop a db design. I then used ODBC to export it to MySQL. The tables all lost their primary key definitions. Now I need to set them back to be a primary key. I have tried: ALTER TABLE def_categories MODIFY ID PRIMARY KEY Any help is appreciated! Sean Tibbetts

RE: Help modify existing column to be Primary Key

2001-04-25 Thread Don Read
On 25-Apr-01 [EMAIL PROTECTED] wrote: I used Access (sorry) to develop a db design. I then used ODBC to export it to MySQL. The tables all lost their primary key definitions. Now I need to set them back to be a primary key. I have tried: ALTER TABLE def_categories MODIFY ID PRIMARY KEY

bug - multiple column primary key cannot correctly determine duplicate entry

2001-04-14 Thread Filip Trojan
Dear MySQL experts In the following example I created simple table with two-column primary key ID,IDT. After some inserts there came insert with ID, IDT values, that are not equal to none of the previous couples, but MySQL still reported error "Duplicate entry". In the l

Re: bug - multiple column primary key cannot correctly determine duplicate entry

2001-04-14 Thread Fred van Engen
Hi, On Sat, Apr 14, 2001 at 11:53:52AM +0200, Filip Trojan wrote: In the following example I created simple table with two-column primary key ID,IDT. After some inserts there came insert with ID, IDT values, that are not equal to none of the previous couples, but MySQL still reported error

Re: bug - multiple column primary key cannot correctly determine duplicate entry

2001-04-14 Thread Ren Tegel
CTED] Sent: Saturday, April 14, 2001 11:53 AM Subject: bug - multiple column primary key cannot correctly determine duplicate entry Dear MySQL experts In the following example I created simple table with two-column primary key ID,IDT. After some inserts there came insert with ID, IDT values, that are

Primary key ID gets messed up after deleting/adding

2001-04-08 Thread David
I have a primary key listed as ID When I first added about 10 records and then deleted a few records and then added more records it didn't replace the missing records. When I select all records to view I now get: 1 2 why didn't it go to 3, 4 and 5 after 2? 6 7 8 When I add a record

Re: Primary key ID gets messed up after deleting/adding

2001-04-08 Thread Jens Vonderheide
When I first added about 10 records and then deleted a few records and then added more records it didn't replace the missing records. That's MySQL's usual behaviour. auto_increment only garantees to create unique keys. "Holes" left by deleting data are not filled. Jens

Re: Primary key ID gets messed up after deleting/adding

2001-04-08 Thread Lindsay Adams
I can understand not wanting to have holes, but.. If it is a primary key, how are you going to handle updating tables that rely on that key id? If your id numbers were to shift, like you want, and you had a related sub table (one to many) and this was say, an shopping cart, then all of a sudden

Re: Primary key ID gets messed up after deleting/adding

2001-04-08 Thread Kobus Myburgh
How would you actually overcome that? Wouldn't it be good if MySQL would be adapted to actually do this for you? -- Kobus "Jens Vonderheide" [EMAIL PROTECTED] 2001-04-08 19:25:48 When I first added about 10 records and then deleted a few records and then added more records it didn't

Re: Primary key ID gets messed up after deleting/adding

2001-04-08 Thread Kobus Myburgh
, but.. If it is a primary key, how are you going to handle updating tables that rely on that key id? If your id numbers were to shift, like you want, and you had a related sub table (one to many) and this was say, an shopping cart, then all of a sudden customer A's line items are showing up in Customer B's

Re: Primary key ID gets messed up after deleting/adding

2001-04-08 Thread Jens Vonderheide
How would you actually overcome that? Wouldn't it be good if MySQL would be adapted to actually do this for you? I think that not reusing deleted numbers is easier (i.e. more efficient). IIRC, earlier versions of MySQL in fact reused the numbers. There are 2 ways to overcome this: 1) Check

Re: Primary key ID gets messed up after deleting/adding

2001-04-08 Thread John Jensen
How I learned to love number gaps: I have a database of colleges and universities. Every degree listing as a numbered id. This used to be auto-incremented. After several deletes and additions, I found it advantageous to have gaps between schools to add new degree listings, so that I didn't

primary key

2001-03-31 Thread developer
how to use more than one field in a table as combined primary key. e-mail= [EMAIL PROTECTED]

Primary Key

2001-03-16 Thread denis mettler
Hi, Can i add the Primary key for a table after i created a table? and if this column is not null and auto_increment will there occur an error? t.i.a. regards denis - Before posting, please check: http://www.mysql.com

composite primary key in Access..?

2001-03-15 Thread vijay khanna
Friends. people out in here are very afraid , when they hear Mysql does not support foreign keys. It really become difficult , why foreign keys are not enforced by mysql. Anyways, can u please tell me does our favourite database support composite primary keys as in Acess databse key...? U

Re: ?difference between Primary Key, Key, Index, Unique

2001-02-25 Thread Bob Hall
On Sat, Feb 24, 2001 at 09:43:45AM -0700, Karl Stubsjoen wrote: I'm trying to understand MySQL indexing but am having trouble understanding the differnences (and when to use each) between Primary Key, Key, Unique, an Index. Can you help? Index and Key are the same. A Primary Key

?difference between Primary Key, Key, Index, Unique

2001-02-24 Thread Karl Stubsjoen
Hello, I'm trying to understand MySQL indexing but am having trouble understanding the differnences (and when to use each) between Primary Key, Key, Unique, an Index. Can you help? Thank you!

Re: ?difference between Primary Key, Key, Index, Unique

2001-02-24 Thread Jeremy D. Zawodny
On Sat, Feb 24, 2001 at 09:43:45AM -0700, Karl Stubsjoen wrote: I'm trying to understand MySQL indexing but am having trouble understanding the differnences (and when to use each) between Primary Key, Key, Unique, an Index. Can you help? Index and Key are the same. A Primary Key

BigInt with primary key

2001-02-20 Thread chchen
hi all i use mysql-3.23.32 my project need to use unsigned Bigint as a primary key. but when i insert many rows in this table. sometimes it will error with Duplicate such like insert into Table values('9231852172526977164',0,0,52056,0,0,0,0,0,52056,0,0,0,0,0,0,0,11,0,'184000','184000',1

Re: BigInt with primary key

2001-02-20 Thread Rolf Hopkins
, which doesn't make sense at all. I'm surprised the insert even works. Thirdly, have you tried checktable/myisamcheck? - Original Message - From: "chchen" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 20, 2001 18:56 Subject: BigInt with primary key hi all i

Re: BigInt with primary key

2001-02-20 Thread chchen
' NOT NULL, sLocation smallint(5) DEFAULT '0' NOT NULL, dLocation smallint(5) DEFAULT '0' NOT NULL, FirstTime time DEFAULT '00:00:00' NOT NULL, LastTime time DEFAULT '00:00:00' NOT NULL, Times smallint(5) unsigned DEFAULT '0' NOT NULL, PRIMARY KEY (A), KEY dLocation (dLocation

Re: BigInt with primary key

2001-02-20 Thread Fred van Engen
On Tue, Feb 20, 2001 at 06:56:28PM +0800, chchen wrote: hi all i use mysql-3.23.32 my project need to use unsigned Bigint as a primary key. but when i insert many rows in this table. sometimes it will error with Duplicate such like insert into Table values('9231852172526977164

SQL PRIMARY KEY question

2001-02-17 Thread Cedric Lefebvre
I have written the following SQL request, but I get an error, why ? create table MovementOrder ( teamCode INT(4) NOT NULL, quarter INT(4) NOT NULL, position INT(4) NOT NULL, priority INT(4) NOT NULL, order VARCHAR(10), parameter VARCHAR(5), PRIMARY KEY(teamCode,quarter,position

PRIMARY KEY (userid), UNIQUE (userid)

2001-02-07 Thread Jacob Friis Larsen
Is there an idea in having a PRIMARY KEY and UNIQUE key for the same table column ? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive

RE: PRIMARY KEY (userid), UNIQUE (userid)

2001-02-07 Thread The Tilghman
No. A primary key is a unique key, by definition. -- "There cannot be a crisis today. My schedule is already full." --Henry Kissinger -Original Message- From: Jacob Friis Larsen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 07, 2001 09:58 To: [EMAIL

RE: PRIMARY KEY (userid), UNIQUE (userid)

2001-02-07 Thread Cal Evans
http://www.calevans.com -Original Message- From: Jacob Friis Larsen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 07, 2001 9:58 AM To: [EMAIL PROTECTED] Subject: PRIMARY KEY (userid), UNIQUE (userid) Is there an idea in having a PRIMARY KEY and UNIQUE key for the same table column

Re: write problems via MS Access 97 in table with timestamp and primary key

2001-01-25 Thread Pat Sherrill
ubject: Re: write problems via MS Access 97 in table with timestamp and primary key I used to get this all the time, myself, when I was trying to update a mysql database with Access 2000 through myodbc. Funny, at the time, nobody else seemed to understand what I was talking about. Once I got

Re: write problems via MS Access 97 in table with timestamp and primary key

2001-01-24 Thread John Jensen
to update certain fields in the table. The table has a timestamp and a primary key. In fact, this user can change certain fileds without difficulty for certain types of data and not for others (i.e. Access accepts changes when the data is a document but not when its a collection). To make t

write problems via MS Access 97 in table with timestamp and primary key

2001-01-23 Thread susan albright
One of our users is getting the message "another user has changed this database..etc save changes to clipboard or drop changes... etc", when he tries to update certain fields in the table. The table has a timestamp and a primary key. In fact, this user can change certain file

<    1   2   3   4   5   6