Re: AUTO_INCREMENT with Replication

2002-07-04 Thread Marc Prewitt
y in since, it should work :) I guess I could also add in > a unique machine id like time integer key + M for master or S for slave S2 > S3 etc. Does that sound insane? Doesn't sound insane at all. We've been using something like that for the past 4 years (before auto_increment

Re: AUTO_INCREMENT with Replication

2002-07-04 Thread Eric Frazier
munication between master & slave, and volume of records going in. > >I have *not* implemented such a system, but this could work, depending on >your app. > >sean > > >- Original Message - >From: "Eric Frazier" <[EMAIL PROTECTED]> >To: <

AUTO_INCREMENT in master-master mode...?

2002-07-04 Thread jfina
Hi all! In MySQL, is replication of auto_increment (primary keys) in a master-master mode working? or is it only working with master-slave? -Jon - Before posting, please check: http://www.mysql.com/manual.php (the manual

Re: AUTO_INCREMENT with Replication

2002-07-03 Thread Eric Frazier
Well. Good to know. So I guess the only alternative would be to generate keys by date/time? I was hoping to avoid that. I am still worried about the timestamp type not having good enough resolution. Seconds are pretty broad. Thanks, Eric >You're asking for trouble. :-) > >AUTO_INCREMENTS a

Re: AUTO_INCREMENT with Replication

2002-07-03 Thread speters
if you set it up so that the slaves occasionally update the master, you can get around the problem as follows. For the *primary* table(s), when you update the master, get the data for 1 row to update from the slave. When you insert this row into the master, remove the auto_increment field from

Re: AUTO_INCREMENT with Replication

2002-07-03 Thread Jeremy Zawodny
On Wed, Jul 03, 2002 at 10:54:23AM -0700, Eric Frazier wrote: > From the manual 4.10.4 > "Replication will be done correctly with AUTO_INCREMENT, LAST_INSERT_ID(), > and TIMESTAMP values." > > I am somewhat fearful and curious about how this works. Say we have > a m

AUTO_INCREMENT with Replication

2002-07-03 Thread Eric Frazier
From the manual 4.10.4 "Replication will be done correctly with AUTO_INCREMENT, LAST_INSERT_ID(), and TIMESTAMP values." I am somewhat fearful and curious about how this works. Say we have a master web database that gets replicated back to the office slave over the Internet. A per

Re: auto_increment and clustering sequence

2002-06-22 Thread Paul DuBois
; >I don't want the auto-increment id to be duplicated - I believe this happens >when the auto_increment column is not the first column - so a >multi-column index >of name,id seems to be out. > >Can I do this and if so how? No. You have no say in how the server stores rows in

Re: auto_increment and clustering sequence

2002-06-21 Thread Dan Nelson
cker. > > I don't want the auto-increment id to be duplicated - I believe this > happens when the auto_increment column is not the first column - so a > multi-column index of name,id seems to be out. Your choice of primary key has no bearing at all on where mysql decides to store a

auto_increment and clustering sequence

2002-06-21 Thread Bill Ferrett
lieve this happens when the auto_increment column is not the first column - so a multi-column index of name,id seems to be out. Can I do this and if so how? Many thanks -- Bill Ferrett Accroserve Systems Ltd. Office: 01702 342148 Mobile: 07855 8

Re: mysql auto_increment question

2002-06-11 Thread Gerald Clark
Taylor Lewick wrote: >Hi all. I have searched the documentation, and i found some info, but I wanted to ask >the lsit a little more about auto_increment. > >First, if I use auto_increment, and then delete a field, I assume mysql leaves the >remaining fields with the original

mysql auto_increment question

2002-06-11 Thread Taylor Lewick
Hi all. I have searched the documentation, and i found some info, but I wanted to ask the lsit a little more about auto_increment. First, if I use auto_increment, and then delete a field, I assume mysql leaves the remaining fields with the original numbers... i.e. if I haverows 1 through 10

Re: Problem when inserting a record - auto_increment field gets max integer value instead of next id

2002-06-05 Thread Egor Egorov
Bobby, Wednesday, June 05, 2002, 1:30:17 PM, you wrote: BO> I have a database with the following table and data: BO> When I add a new record the auto_increment number becomes '2147483647' BO> not sure why? Checked the SHOW TABLE STATUS too and this shows that the BO> next

RE: Problem when inserting a record - auto_increment field gets max integer value instead of next id

2002-06-05 Thread Bobby Oswald
Cool, no negatives reset the key and it works, thanks, > -Original Message- > From: Bobby Oswald > Sent: 05 June 2002 13:50 > To: Fred van Engen; [EMAIL PROTECTED] > Subject: RE: Problem when inserting a record - auto_increment > field gets max integer value

Re: Problem when inserting a record - auto_increment field gets max integer value instead of next id

2002-06-05 Thread Fred van Engen
their latest auto_increment ID. I believe there is also a command you can use to reset the auto_increment ID, but you would still need to take care to not insert negative values. Regards, Fred. > > -Original Message- > > From: Fred van Engen [mailto:[EMAIL PROTECTED]] > >

RE: Problem when inserting a record - auto_increment field gets max integer value instead of next id

2002-06-05 Thread Bobby Oswald
Removed all the negative values and the same problem still occurs > -Original Message- > From: Fred van Engen [mailto:[EMAIL PROTECTED]] > Sent: 05 June 2002 12:50 > To: [EMAIL PROTECTED] > Subject: Re: Problem when inserting a record - auto_increment > field gets

Re: Problem when inserting a record - auto_increment field gets max integer value instead of next id

2002-06-05 Thread Fred van Engen
Bobby, On Wed, Jun 05, 2002 at 12:30:17PM +0200, Bobby Oswald wrote: > I have a database with the following table and data: > > When I add a new record the auto_increment number becomes '2147483647' > not sure why? Checked the SHOW TABLE STATUS too and this shows that the

Problem when inserting a record - auto_increment field gets max integer value instead of next id

2002-06-05 Thread Bobby Oswald
Hi, I have a database with the following table and data: When I add a new record the auto_increment number becomes '2147483647' not sure why? Checked the SHOW TABLE STATUS too and this shows that the next auto_increment number will be '2147483647' anyone know why? R

Re: DELETE syntax and auto_increment 'reset'

2002-05-22 Thread Paul DuBois
At 18:29 -0400 5/22/02, Jule wrote: >Hey guys, >when i delete a row using the query DELETE FROM $table WHERE id = "3" LIMIT 1; > >how can i make it that the id column (auto_increment) starts over from 1 and >build up to however many rows there are without counting 1

DELETE syntax and auto_increment 'reset'

2002-05-22 Thread Jule
Hey guys, when i delete a row using the query DELETE FROM $table WHERE id = "3" LIMIT 1; how can i make it that the id column (auto_increment) starts over from 1 and build up to however many rows there are without counting 1 2 4 5 6 etc.? any id

Re: AUTO_INCREMENT= ? - solved

2002-05-13 Thread Amer Neely
Thanks to Paul Dubois, I've figured out the problem of setting AUTO_INCREMENT to a default value in batch mode (from within a .sql file). I was executing a 'DELETE FROM' statement immediately before my 'LOAD DATA ' statement, which knocks the default value down to 0, reg

Re: AUTO_INCREMENT= ?

2002-05-13 Thread Paul DuBois
>> >> >Hmm. I'm not using INSERT, but LOAD DATA. Maybe that's the culprit? >> >> >> >> Maybe. In data files loaded with LOAD DATA, NULL values >>should be specified >> >> as \N, not as the word NULL. >> >> I'

Re: AUTO_INCREMENT= ?

2002-05-13 Thread Amer Neely
>> Maybe. In data files loaded with LOAD DATA, NULL values should be specified > >> as \N, not as the word NULL. > >> I'm not sure that that will make a difference, though. MySQL will see NULL, > >> perform a string-to-number conversion and end up with a v

Re: AUTO_INCREMENT= ?

2002-05-13 Thread Paul DuBois
tatements differently in batch mode >> >> than in interactive mode. >> > >> >Hmm. I'm not using INSERT, but LOAD DATA. Maybe that's the culprit? >> >> Maybe. In data files loaded with LOAD DATA, NULL values should be specified >> as \N, n

Re: AUTO_INCREMENT= ?

2002-05-13 Thread Amer Neely
> >> >> AN> Win/98 > >> >> AN> MySQL 3.23.46 > >> >> > >> >> AN> I'm trying to use AUTO_INCREMENT=1000 to specify my > >>staring value in an > >> >> AN> ID column in batch mode, but it doe

Re: AUTO_INCREMENT= ?

2002-05-13 Thread Paul DuBois
At 17:41 -0400 5/13/02, Amer Neely wrote: >Paul DuBois wrote: >> >> At 15:23 -0400 5/13/02, Amer Neely wrote: >> > > Amer, >> >> Monday, May 13, 2002, 2:03:28 AM, you wrote: >> >> >> >> AN> Win/98 >> >>

Re: AUTO_INCREMENT= ?

2002-05-13 Thread Amer Neely
Curtis Maurand wrote: > > How about: > > UserID SMALLINT UNSIGNED AUTO_INCREMENT NULL PRIMARY KEY DEFAULT 1000 > > Curtis > Good suggestion. But it too returns 1..7 when I do a 'select userid from respondents'. > Amer Neely said: > >> Amer, >

Re: AUTO_INCREMENT= ?

2002-05-13 Thread Amer Neely
Paul DuBois wrote: > > At 15:23 -0400 5/13/02, Amer Neely wrote: > > > Amer, > >> Monday, May 13, 2002, 2:03:28 AM, you wrote: > >> > >> AN> Win/98 > >> AN> MySQL 3.23.46 > >> > >> AN> I'm trying to use AUTO

Re: AUTO_INCREMENT= ?

2002-05-13 Thread Curtis Maurand
How about: UserID SMALLINT UNSIGNED AUTO_INCREMENT NULL PRIMARY KEY DEFAULT 1000 Curtis Amer Neely said: >> Amer, >> Monday, May 13, 2002, 2:03:28 AM, you wrote: >> >> AN> Win/98 >> AN> MySQL 3.23.46 >> >> AN> I'm trying to use AUTO_IN

Re: AUTO_INCREMENT= ?

2002-05-13 Thread Paul DuBois
At 15:23 -0400 5/13/02, Amer Neely wrote: > > Amer, >> Monday, May 13, 2002, 2:03:28 AM, you wrote: >> >> AN> Win/98 >> AN> MySQL 3.23.46 >> >> AN> I'm trying to use AUTO_INCREMENT=1000 to specify my staring value in an >> AN>

Re: AUTO_INCREMENT= ?

2002-05-13 Thread Luciano Barcaro
t;MySQL" by Paul DuBois [p.94, chap.2.]. Again, >this works in interactive mode, but NOT in batch mode. Can you or >someone explain how this can be done in batch mode? > What you can do is the following: After the Create table command, add : Alter table Respondents auto_increment=1000

Re: AUTO_INCREMENT= ?

2002-05-13 Thread Amer Neely
> Amer, > Monday, May 13, 2002, 2:03:28 AM, you wrote: > > AN> Win/98 > AN> MySQL 3.23.46 > > AN> I'm trying to use AUTO_INCREMENT=1000 to specify my staring value in an > AN> ID column in batch mode, but it doesn't want to work. I can get it to

Re: AUTO_INCREMENT= ?

2002-05-13 Thread Victoria Reznichenko
Amer, Monday, May 13, 2002, 2:03:28 AM, you wrote: AN> Win/98 AN> MySQL 3.23.46 AN> I'm trying to use AUTO_INCREMENT=1000 to specify my staring value in an AN> ID column in batch mode, but it doesn't want to work. I can get it to AN> work in interactive mo

AUTO_INCREMENT= ?

2002-05-12 Thread Amer Neely
Win/98 MySQL 3.23.46 I'm trying to use AUTO_INCREMENT=1000 to specify my staring value in an ID column in batch mode, but it doesn't want to work. I can get it to work in interactive mode though. In a file (create_tables.sql) I have: CREATE TABLE Respondents (UserID SMALLIN

Re: auto_increment fields get mangled in some cases when doing analter table

2002-04-15 Thread Paul DuBois
At 14:17 -0700 4/15/02, Tani Hosokawa wrote: >If you have a table with an auto_increment column and one of the rows >has the value set to 0, doing an ALTER TABLE will change that value to >either 2147483647 or the next auto_increment value. Storing anything other than positive integ

auto_increment fields get mangled in some cases when doing an alter table

2002-04-15 Thread Tani Hosokawa
If you have a table with an auto_increment column and one of the rows has the value set to 0, doing an ALTER TABLE will change that value to either 2147483647 or the next auto_increment value. mysql> create table blah (id int not null primary key auto_increment,stuff char(128)); Query OK, 0 r

Re: auto_increment setting the start number

2002-04-14 Thread Kevin Smith
mysql... see below, got caught be the filter of this list... - Original Message - From: <[EMAIL PROTECTED]> To: "Kevin Smith" <[EMAIL PROTECTED]> Sent: Sunday, April 14, 2002 3:13 PM Subject: Re: auto_increment setting the start number > Your message cannot be

Re: Can AUTO_INCREMENT return from INSERT function into a table ?

2002-04-08 Thread Paul DuBois
;| Field | Type | Null | Key | Default | Extra >> | >> >>+-+--+--+-+-+----+ >> >| thread_ID | int(11) | | PRI | NULL| auto_increment >> | >> >| subject | varchar(2

Re: Can AUTO_INCREMENT return from INSERT function into a table ?

2002-04-07 Thread Erlend Stromsvik
Check out this: http://www.mysql.com/doc/L/O/LOCK_TABLES.html User 1 must do a 'write lock' on the table, before calling the insert statement. Then User 2's qery will have to wait till User 1 calls Unlock. USER 1 ===> WRITE LOCK > > USER 1 ===> INSERT > STOP <== due to process sch

RE: Can AUTO_INCREMENT return from INSERT function into a table ?

2002-04-07 Thread Noel Clarkson
+--+-+-++ > > >| Field | Type | Null | Key | Default | Extra > > | > > > >+-+--+--+-+-----+----+ > > >| thread_ID | int(11) | | PRI | NULL| auto_incr

Re: Can AUTO_INCREMENT return from INSERT function into a table ?

2002-04-07 Thread Son Nguyen
| Null | Key | Default | Extra > | > >+-+--+--+-+-++ > >| thread_ID | int(11) | | PRI | NULL| auto_increment > | > >| subject | varchar(255) | YES | | NULL| > | > >| author | varchar(30) | YES |

Re: Can AUTO_INCREMENT return from INSERT function into a table ?

2002-04-07 Thread BD
thread_ID | int(11) | | PRI | NULL | auto_increment | >| subject | varchar(255) | YES | | NULL|| >| author | varchar(30) | YES | | NULL|| >| last_by | varchar(30) | YES | | NULL|

Can AUTO_INCREMENT return from INSERT function into a table ?

2002-04-07 Thread Son Nguyen
ULL | auto_increment | | subject | varchar(255) | YES | | NULL|| | author | varchar(30) | YES | | NULL|| | last_by | varchar(30) | YES | | NULL|| | views | int(11) | |

RE: auto_increment question

2002-03-29 Thread Lopez David E-r9374c
ROTECTED]] Sent: Thursday, March 28, 2002 4:45 PM To: [EMAIL PROTECTED] Subject: auto_increment question This is my first time posting to this list, so please forgive me if I am not doing this correctly. I will break this into post into two parts: what i want to know and why. Is there a way to get

Re: auto_increment question

2002-03-28 Thread Joel Rees
Jeff Habermann asked: > well. Now, because of this deletion, there are sequence gaps in the "idx" > field. We would like to be able to use those numbers again for incoming > clients...Is this possible? It looks like you can, but IMHO, it would probably be more effective to add a DELETED flag to

auto_increment question

2002-03-28 Thread Jeff Habermann
This is my first time posting to this list, so please forgive me if I am not doing this correctly. I will break this into post into two parts: what i want to know and why. Is there a way to get auto_increment fields to fill in gaps in the numbering sequence if some records have been deleted

auto_increment and range or highest value

2002-03-27 Thread Bernard Chambon
2_ What's happens when the highest value is reached I have made a try with : create table Generator (Sequence smallint(7) zerofill unique primary key not null auto_increment ) type=innodb ; insert into Generator values(null); update Generator se

Re: Auto_increment and TimeStamp Fields

2002-03-25 Thread Eric Baines
TED]> To: "Eric Baines" <[EMAIL PROTECTED]>, [EMAIL PROTECTED] cc: 03/25/02 03:02 PMSubjec

Re: Auto_increment and TimeStamp Fields

2002-03-25 Thread Paul DuBois
At 14:54 -0500 3/25/02, Eric Baines wrote: >I have created a table with a Primary Key that is an auto_incrementing >field. I was able to receive the auto_increment values by issuing a >last_insert_id(). When I added a timestamp to this table, the >last_insert_id() no longer return

Auto_increment and TimeStamp Fields

2002-03-25 Thread Eric Baines
I have created a table with a Primary Key that is an auto_incrementing field. I was able to receive the auto_increment values by issuing a last_insert_id(). When I added a timestamp to this table, the last_insert_id() no longer returned any value except 0. Is there a MySQL rule that you can

Re: **AUTO_INCREMENT Questions**

2002-02-18 Thread DL Neil
Hi Kevin, > I'm converting a database from a filesharing based technology to mySQL. The > database has its own column type called Sequence which is the same as using > the AUTO_INCREMENT property. I'd like to use AUTO_INCREMENT if possible but > I'm not really sure

**AUTO_INCREMENT Questions**

2002-02-18 Thread Kevin Gale
Hi. I'm converting a database from a filesharing based technology to mySQL. The database has its own column type called Sequence which is the same as using the AUTO_INCREMENT property. I'd like to use AUTO_INCREMENT if possible but I'm not really sure what I can do with it - c

Re: auto_increment value recycled/reset in BDB table? [3.23.46]

2002-02-14 Thread Sinisa Milivojevic
Thank you, we shall investigate this problem. -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus <___/ www.mysql.com

RE: Reset auto_increment

2002-02-13 Thread Rick Emery
. -Original Message- From: Wei Gao [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 2:10 PM To: [EMAIL PROTECTED] Subject: Reset auto_increment Hi, As I am new to MySQL, perhaps this is a common question you have been asked. I have a field "Id" which using auto_increm

Reset auto_increment

2002-02-13 Thread Wei Gao
Hi, As I am new to MySQL, perhaps this is a common question you have been asked. I have a field "Id" which using auto_increment. Now I want to reset the value of auto_increment, that is the "Id" starts form 1 and does not skip the number. I have spent a few hours to find a

auto_increment value recycled/reset in BDB table? [3.23.46]

2002-02-12 Thread Steven Haryanto
i believe since 3.23.39 it should not be? mysql> create table t1_b(i int unsigned primary key auto_increment, j int) type=bdb; mysql> create table t1_m(i int unsigned primary key auto_increment, j int) type=myisam; mysql> insert into t1_bdb(j)values(0); mysql> insert into t1_bd

Re: auto_increment value recycled/reset in BDB table? [3.23.46]

2002-02-12 Thread Steven Haryanto
At 11/02/2002 05:21, Paul DuBois wrote: >At 4:10 +0700 2/11/02, Steven Haryanto wrote: >>i believe since 3.23.39 it should not be? > >BDB and MyISAM tables have different properties with respect to >AUTO_INCREMENT behavior. i see, so this is an "undocumented feature&qu

Re: auto_increment value recycled/reset in BDB table? [3.23.46]

2002-02-10 Thread Steven Haryanto
At 11/02/2002 05:21, Paul DuBois wrote: >At 4:10 +0700 2/11/02, Steven Haryanto wrote: >>i believe since 3.23.39 it should not be? > >BDB and MyISAM tables have different properties with respect to >AUTO_INCREMENT behavior. i see, so this is an "undocumented feature&qu

Re: auto_increment value recycled/reset in BDB table? [3.23.46]

2002-02-10 Thread Paul DuBois
At 4:10 +0700 2/11/02, Steven Haryanto wrote: >i believe since 3.23.39 it should not be? BDB and MyISAM tables have different properties with respect to AUTO_INCREMENT behavior. > >mysql> create table t1_b(i int unsigned primary key auto_increment, >j int) type=bdb; >mysql>

auto_increment value recycled/reset in BDB table? [3.23.46]

2002-02-10 Thread Steven Haryanto
i believe since 3.23.39 it should not be? mysql> create table t1_b(i int unsigned primary key auto_increment, j int) type=bdb; mysql> create table t1_m(i int unsigned primary key auto_increment, j int) type=myisam; mysql> insert into t1_bdb(j)values(0); mysql> insert into t1_bd

RE: Reset auto_increment

2002-02-07 Thread Paul DuBois
ou are trying to restart numbering while not deleting records, >forget-about-it. ALTER TABLE tbl_name DROP id, ADD id INT UNSIGNED NOT NULL AUTO_INCREMENT FIRST, AUTO_INCREMENT = 1; But why do this? MySQL doesn't care if the sequence has holes in it or not. >-Original Message- >

RE: Reset auto_increment

2002-02-07 Thread Rick Emery
. -Original Message- From: Wei Gao [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 2:10 PM To: [EMAIL PROTECTED] Subject: Reset auto_increment Hi, As I am new to MySQL, perhaps this is a common question you have been asked. I have a field "Id" which using auto_increm

Reset auto_increment

2002-02-07 Thread Wei Gao
Hi, As I am new to MySQL, perhaps this is a common question you have been asked. I have a field "Id" which using auto_increment. Now I want to reset the value of auto_increment, that is the "Id" starts form 1 and does not skip the number. I have spent a few hours to find a

RE: AUTO_INCREMENT columns randomly restart counting from 1

2002-02-04 Thread Andreas Schoelver
Hi Michael 01.02.02 16:27:24, "Fochtman, Michael" <[EMAIL PROTECTED]> wrote: >BMJI, > >But isn't 'last_insert_id()' only meant to be called after inserting a >record?? If you've never inserted a record (using the current connection), >it seems like calling 'last_insert_id()' would be a meaningl

RE: AUTO_INCREMENT columns randomly restart counting from 1

2002-02-04 Thread Andreas Schoelver
Hi Bruce 01.02.02 15:41:49, Bruce Stewart <[EMAIL PROTECTED]> wrote: >Hi Andreas, > >> >I think AUTO_INCREMENT is on a per-connection basis. So if >> you're doing >> >this across different database connections, it will reset to 0. >[snip] >&g

RE: AUTO_INCREMENT columns randomly restart counting from 1

2002-02-01 Thread Fochtman, Michael
e Fochtman > -Original Message- > From: Bruce Stewart [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 01, 2002 9:42 AM > To: 'Andreas Schoelver'; [EMAIL PROTECTED] > Subject: RE: AUTO_INCREMENT columns randomly restart counting from 1 > > > Hi Andre

RE: AUTO_INCREMENT columns randomly restart counting from 1

2002-02-01 Thread Bruce Stewart
Hi Andreas, > >I think AUTO_INCREMENT is on a per-connection basis. So if > you're doing > >this across different database connections, it will reset to 0. [snip] > do a 'select * from where test=1' and you will > see that the 2 new > values will b

RE: Next auto_increment value?

2002-02-01 Thread Rick Emery
$recno LIMIT 1"; $result = mysql_query($query) or die("Error: ".mysql_error()); ?> -Original Message- From: Zak Grant [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 6:08 AM To: [EMAIL PROTECTED] Subject: Next auto_increment value? All, I'm a

Next auto_increment value?

2002-02-01 Thread Zak Grant
All, I'm a little (lot!) stuck on generating what seems to be quite a simple query... Example: I have a table with ID as auto_increment It contains values 1 to 10 I delete #7 How can I, using MySQL, say "I have the number 6 - what's the next valid ID up/down from this?&qu

RE: AUTO_INCREMENT columns randomly restart counting from 1

2002-02-01 Thread Andreas Schoelver
30.01.02 17:48:06, Richard Bolen <[EMAIL PROTECTED]> wrote: > >I think AUTO_INCREMENT is on a per-connection basis. So if you're doing >this across different database connections, it will reset to 0. no, that's not the case. just try it. crate a table with column id as

RE: AUTO_INCREMENT columns randomly restart counting from 1

2002-01-30 Thread Richard Bolen
I think AUTO_INCREMENT is on a per-connection basis. So if you're doing this across different database connections, it will reset to 0. Rich Hi there We have some table used as sequences. They only have 2 columns (ID, PID), with the AUTO_INCREMENT flag set for one of them (ID). By de

Re: AUTO_INCREMENT columns randomly restart counting from 1

2002-01-30 Thread Paul DuBois
At 17:15 +0100 1/30/02, Andreas Schoelver wrote: >Hi there > >We have some table used as sequences. >They only have 2 columns (ID, PID), with the AUTO_INCREMENT flag set >for one of them (ID). Is the ID column one of the integer types? >By default the tables are empty! >

AUTO_INCREMENT columns randomly restart counting from 1

2002-01-30 Thread Andreas Schoelver
Hi there We have some table used as sequences. They only have 2 columns (ID, PID), with the AUTO_INCREMENT flag set for one of them (ID). By default the tables are empty! The increment process is done by inserting a new record with a random value for the non-auto_increment column. After that

RE: Can Anyone explain / help with auto_increment fields.

2002-01-24 Thread Egor Egorov
ble free value. MD> -Original Message- MD> From: Christopher Thompson [mailto:[EMAIL PROTECTED]] MD> Sent: 23 January 2002 22:29 MD> To: [EMAIL PROTECTED]; [EMAIL PROTECTED] MD> Subject: Re: Can Anyone explain / help with auto_increment fields. MD> At 10:23 PM 1/23/

RE: Can Anyone explain / help with auto_increment fields.

2002-01-23 Thread Matthew Darcy
thanks a simple but effective explination. -Original Message- From: Christopher Thompson [mailto:[EMAIL PROTECTED]] Sent: 23 January 2002 22:29 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: Can Anyone explain / help with auto_increment fields. At 10:23 PM 1/23/2002 +, you

Re: Can Anyone explain / help with auto_increment fields.

2002-01-23 Thread Christopher Thompson
At 10:23 PM 1/23/2002 +, you wrote: >Hi, > >I have a blank table for some testing. > >1 of the fields (the primary key) is an auto_increment and not null. > >how and what do I insert into this field to start off the recordsets. also >once I have set the records going

Can Anyone explain / help with auto_increment fields.

2002-01-23 Thread Matthew Darcy
Hi, I have a blank table for some testing. 1 of the fields (the primary key) is an auto_increment and not null. how and what do I insert into this field to start off the recordsets. also once I have set the records going say to 1, what do I then insert if anything into this field for the next

Re: auto_increment

2002-01-16 Thread Kyle Hayes
On Wednesday 16 January 2002 07:28, Hamlin Nicholas-qa568 wrote: > Easier yet, when using DBI::mysql, is: > > my $IncrementedID = $dbh->{'mysql_insertid'}; > > > When executed after the INSERT command. Does this now work with 64-bit auto-increment fields now in DBI? As of less than a year ago,

RE: auto_increment

2002-01-16 Thread Hamlin Nicholas-qa568
MAIL PROTECTED] Subject: RE: auto_increment To answer your second question about how to retrieve the auto_incremented values: $dbh->do("SELECT last_insert_id() AS myvalue"); execute the above IMMEDIATELY after inserting the record -Original Message- From: Ben Curran [mai

RE: auto_increment

2002-01-16 Thread Rick Emery
ry 15, 2002 5:59 PM To: [EMAIL PROTECTED] Subject: auto_increment Sorry if this is a newbie question, I've been through the manual, still can't figure it out. If one has created a table, with a key using auto_increment, how does one Insert data into it? If my table consists of (

Re: auto_increment

2002-01-15 Thread Rune Sandbakken
Ben Curran wrote: > If one has created a table, with a key using auto_increment, how does one > Insert data into it? Data is automatically inserted for you ;-) > If my table consists of (inID (primary key, auto incremented), employeeID > (foreign key) time, date). > if I

auto_increment

2002-01-15 Thread Ben Curran
Sorry if this is a newbie question, I've been through the manual, still can't figure it out. If one has created a table, with a key using auto_increment, how does one Insert data into it? If my table consists of (inID (primary key, auto incremented), employeeID (foreign key) time, d

Re: auto_increment, creating table

2002-01-08 Thread Jeremy Zawodny
On Tue, Jan 08, 2002 at 04:16:49PM -0700, Dan Jordan wrote: > Hi Jeremy, > > I just noticed your name today on the mysql mailing list and > recognised your name. I'm a new user of MySQL and saw that you will > soon have a new book out. Well yes, not the book that you think. :-) I'm working on

RE: auto_increment, creating table

2002-01-08 Thread Dan Jordan
forward to seeing your new book when it comes into print! Dan Jordan -Original Message- From: Jeremy Zawodny [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 08, 2002 3:02 PM To: Steve Bearss Cc: MySQL Info Subject: Re: auto_increment, creating table On Tue, Jan 08, 2002 at 04:56:52PM -0

Re: auto_increment, creating table

2002-01-08 Thread DL Neil
Steve, > what is wrong with this statement? > > > mysql> create table message (messageId AUTO_INCREMENT, timePosted > VARCHAR(25), > -> userEmail VARCHAR(30), messagePosted MEDIUMBLOB); > > ERROR 1064: You have an error in your SQL syntax near 'AUTO_IN

Re: auto_increment, creating table

2002-01-08 Thread Jeremy Zawodny
On Tue, Jan 08, 2002 at 04:56:52PM -0500, Steve Bearss wrote: > > what is wrong with this statement? > > > mysql> create table message (messageId AUTO_INCREMENT, timePosted > VARCHAR(25), > -> userEmail VARCHAR(30), messagePosted MEDIUMBLOB); > > ERROR 10

auto_increment, creating table

2002-01-08 Thread Steve Bearss
what is wrong with this statement? mysql> create table message (messageId AUTO_INCREMENT, timePosted VARCHAR(25), -> userEmail VARCHAR(30), messagePosted MEDIUMBLOB); ERROR 1064: You have an error in your SQL syntax near 'AUTO_INCREMENT, timePoste d VARCHAR(25), userEmail

Re: Auto_Increment and the DELETE Statement

2002-01-07 Thread Paul DuBois
At 16:52 -0600 1/7/02, Rick Emery wrote: >I don't know if this is a bug or a feature. Just an observation concerning >creating MYISAM tables with auto_increment. > >CREATE TABLE mytable (myval int auto_increment unique ) AUTO_INCREMENT=9000; >INSERT INTO mytable VALUES

RE: auto_increment

2002-01-07 Thread Rick Emery
You can also set the auto_increment start value in the CREATE table: CREATE TABLE mytable ( myval int auto_increment) AUTO_INCREMENT=100; Note that the AUTO_INCREMENT=100 is set outside of the fields' definitions. However, when you delete all records with "DELETE FROM mytable&quo

Auto_Increment and the DELETE Statement

2002-01-07 Thread Rick Emery
I don't know if this is a bug or a feature. Just an observation concerning creating MYISAM tables with auto_increment. CREATE TABLE mytable (myval int auto_increment unique ) AUTO_INCREMENT=9000; INSERT INTO mytable VALUES(NULL); INSERT INTO mytable VALUES(NULL); these above INSERTS c

RE: auto_increment

2002-01-07 Thread Daniel Backhausen
hi. yes it is possible. 1. Create an new column which has an auto_increment option 2. Insert the first dataset manually as followed: " INSERT INTO test (auto, char) VALUES ('100', 'Hello World!') " 3. From there on your auto column will count starting from

RE: auto_increment

2002-01-07 Thread John Lodge
Manish, If you manually insert a record with a value of 100 in the auto_increment field, then it will work from then on. If there is a way to create the table telling the value to start at 100, then I don't know what it is. Hope this is a help John Lodge -Original Message-

auto_increment

2002-01-07 Thread Manish Mehta
Hi Is it possible auto_increment start 100 instead of 1 . for example create table a ( a int(10) primary key auto_increment 100); Manish Mehta E-mail: [EMAIL PROTECTED] - Before posting, please check: http

incrementing a non auto_increment column on insert

2001-12-30 Thread Charley L. Tiggs
I have the ID column auto_incrementing and I don't want to change that. Newbie that I am, I tried to add auto_increment to another column and failed. Is there any way to have a field other than the ID field increment by a set value? create table test ( ID mediumint(9) NOT

WISHLIST: auto_increment after delete

2001-12-03 Thread Christian Hammers
Hello MySQL developers please add a ALTER TABLE xyz eternal_auto_increment=1; that forces the auto_increment column to increment regardless of which table type I use and how I delete my columns. As long as there is a way to reset the column somehow (by setting it to -1 or so) I would

How Auto_INCREMENT works

2001-11-27 Thread Giuseppe Maxia
> Hi all, > I have a question: > I made a table with a field that is auto_increment. This field I made to be > the primary key. > In my opinion an auto_increment field should fill itself, without the > intervention of the user. > So if I have a table like: > f1,f2 --

How Auto_INCREMENT works

2001-11-27 Thread Jurj Emil
Hi all, I have a question: I made a table with a field that is auto_increment. This field I made to be the primary key. In my opinion an auto_increment field should fill itself, without the intervention of the user. So if I have a table like: f1,f2 --field names, where f1 is auto_increment

Question on auto_increment

2001-11-23 Thread Jack
I knew that if record at the Largest number of index being delete, the number will be reused, but i have a question: what happen if i delete the record which the index number is between the largest and the smallest, let say "i have 3 records within my table, by some reason, i got to delete the re

RE: Question on auto_increment

2001-11-23 Thread Alex Dowgailenko
If the colum is set to unique, it will fill in 2. If not, it'll automatically goto 4 (or vice versa if I'm mistaken). > -Original Message- > From: Jack [mailto:[EMAIL PROTECTED]] > Sent: November 23, 2001 7:46 AM > To: Mysql List > Subject: Question on auto_incre

Re: Question on auto_increment

2001-11-23 Thread Carl Troein
gt; > will it leave a index gap between or it will move the record of index 3 up > > to index 2??? You're both wrong. You should test it, and see for yourselves that unless you're using the old and obsolete ISAM table format, auto_increment values are NEVER reused. This, of course,

<    1   2   3   4   5   6   7   >