AUTO_INCREMENT and INDEX feature?

2003-02-24 Thread Julian
Hi All, I have MyISAM table with auto_increment property. CREATE TABLE rcatdb_categories ( ID bigint(15) NOT NULL auto_increment, ... PRIMARY KEY (ID), ... however I would like to create as smaller as possible index for ID (by default this is automaticaly done with PRIMARY KEY

Re:Re: AUTO_INCREMENT and INDEX feature?

2003-02-24 Thread Julian
as possible my db, so select-s to be much faster using index/key. However I would like to support a large number of possible rows(to be inserted in respective tables). Also auto_increment remember the biggest value, which not means that table can't takes no more rows, i.e. INSERT_ID = MAX_VALUE and I

Re:Re: AUTO_INCREMENT and INDEX feature?

2003-02-24 Thread Keith C. Ivey
On 24 Feb 2003, at 17:44, Julian wrote: MEDIUMINT takes only 8 bytes, but BIGINT takes 20, so the whole DB grows, Where did you get those numbers? According to the documentation (http://www.mysql.com/doc/en/Storage_requirements.html), MEDIUMINT is 3 bytes and BIGINT is 8. And why are you

Re: AUTO_INCREMENT and INDEX feature?

2003-02-24 Thread Roger Baklund
number of possible rows(to be inserted in respective tables). Then you are in conflict with yourself... ;) You have to choose: a small datatype to preserve space _or_ a wider datatype to allow for bigger values. [...] will be inc. with 1 and one pretty day auto_increment will become over

INSERT INTO table1 VALUES (DEFAULT): Auto_increment colums do not count up

2003-02-24 Thread Thomas Mayer
== INSERT INTO table1 VALUES (DEFAULT): Auto_increment colums do not count up == I am trying to insert values via PHP into a table with an autoincrement

getting NULL in auto_increment column

2003-02-24 Thread Danny
Can you update an auto_increment with NULL in MySQL? Obviously if you try and put a NULL in directly it will increment to the next integer. Is there some way to actually get a NULL in there instead of the integer? - Before

Re: getting NULL in auto_increment column

2003-02-24 Thread 1LT John W. Holmes
Can you update an auto_increment with NULL in MySQL? Obviously if you try and put a NULL in directly it will increment to the next integer. Is there some way to actually get a NULL in there instead of the integer? No that's why you declare it NOT NULL when you create it. ---John Holmes

Re: getting NULL in auto_increment column

2003-02-24 Thread gerald_clark
Danny wrote: Can you update an auto_increment with NULL in MySQL? Obviously if you try and put a NULL in directly it will increment to the next integer. Is there some way to actually get a NULL in there instead of the integer? No. Why would you want

Re: getting NULL in auto_increment column

2003-02-24 Thread Danny
gerald_clark writes: Danny wrote: Can you update an auto_increment with NULL in MySQL? Obviously if you try and put a NULL in directly it will increment to the next integer. Is there some way to actually get a NULL in there instead of the integer? No. Why would you want to? Because I have

RE: getting NULL in auto_increment column

2003-02-24 Thread Jennifer Goodie
] Subject: Re: getting NULL in auto_increment column gerald_clark writes: Danny wrote: Can you update an auto_increment with NULL in MySQL? Obviously if you try and put a NULL in directly it will increment to the next integer. Is there some way to actually get a NULL in there instead of the integer

Retrieving value of auto_increment field from SQL at time of insert

2003-02-20 Thread Dubery
Hi all, I have a table that includes an auto_increment field. This is used to build up an audit trail of the passage of a file through my server. As a file is received from a remote system I create the first entry for that file in the audit trail table. I build up an sql INSERT command (I'm

RE: Retrieving value of auto_increment field from SQL at time of insert

2003-02-20 Thread John W. Holmes
I have a table that includes an auto_increment field. This is used to build up an audit trail of the passage of a file through my server. As a file is received from a remote system I create the first entry for that file in the audit trail table. I build up an sql INSERT command (I'm

Re: Retrieving value of auto_increment field from SQL at time ofinsert

2003-02-20 Thread Paul DuBois
At 22:45 +0200 2/20/03, Dubery wrote: Hi all, I have a table that includes an auto_increment field. This is used to build up an audit trail of the passage of a file through my server. As a file is received from a remote system I create the first entry for that file in the audit trail table. I

Feature Request: Return AUTO_INCREMENT on INSERT

2003-02-18 Thread Shane Allen
How about this: mysql CREATE TABLE tablename (value1 int(10) AUTO_INCREMENT, value2 timestamp(14), PRIMARY KEY (value1)); Query OK, 0 rows affected (0.00 sec) mysql INSERT SQL_RETURN_INSERT_ID INTO tablename (value1, value2) VALUES (0, NOW()); +-+ | INSERT_ID

Re: auto_increment every year

2003-02-17 Thread alx
all I'm searching in how to generate a auto_increment number starting form 1 every year I mean ID DATE 1 2003 2 2003 1 2004 2 2004 etc maybe possible or I've to use some c code to make it possible ? TIA Alx -- int a=1,b,c=2800,d,e,f[2801],g;main(){for(;b-c;) f[b

Re: Re: auto_increment every year

2003-02-17 Thread Paul DuBois
sql,query,queries,smallint HI all I'm searching in how to generate a auto_increment number starting form 1 every year I mean ID DATE 1 2003 2 2003 1 2004 2 2004 etc maybe possible or I've to use some c code to make it possible ? Yes, this is possible

re: 3.23.41: auto_increment bug with TRIPLE primary key? (really strange)

2003-02-13 Thread Victoria Reznichenko
queries are provided at the bottom of this message. I'm using the nifty multi-column-primary-key auto_increment feature of MySQL as described at http://www.mysql.com/doc/en/example-AUTO_INCREMENT.html In one table I have: |Field |Type |Null|Key|Default|Extra | |id |bigint

re: 3.23.41: auto_increment bug with TRIPLE primary key? (reallystrange)

2003-02-13 Thread Paul DuBois
things happened when I wrote test code. Example SQL queries are provided at the bottom of this message. I'm using the nifty multi-column-primary-key auto_increment feature of MySQL as described at http://www.mysql.com/doc/en/example-AUTO_INCREMENT.html In one table I have: |Field |Type

3.23.41: auto_increment bug with TRIPLE primary key? (really strange)

2003-02-11 Thread The Mindflayer
the nifty multi-column-primary-key auto_increment feature of MySQL as described at http://www.mysql.com/doc/en/example-AUTO_INCREMENT.html In one table I have: |Field |Type |Null|Key|Default|Extra | |id |bigint(20)||PRI|1 | | |revision|bigint(20)||PRI

Endian problem in auto_increment variable?

2003-01-29 Thread hgs
Description: After fixing a table with myisamcheck on Linux, the auto_increment on Solaris was completely off (very large 9-digit integer instead of around 50,000). My suspicion is that this has to do with an endianness issue. (I had to use Linux since the Solaris version of myisamcheck just

Re: reset auto_increment

2003-01-11 Thread Paul DuBois
At 16:06 -0500 1/10/03, INVALID - TESTING ONLY. IF YOU GET EMAIL WITH THIS ACCOUNT P wrote: I need to reset the auto_increment in a table full of data. I had a problem recently where some script was putting InvoiceID numbers into an auto_increment CustID column...I since fixed the problem

reset auto_increment

2003-01-11 Thread INVALID - TESTING ONLY. IF YOU GET EMAIL WITH THIS ACCOUNT PLEASE REPLY TO [EMAIL PROTECTED] INSTEAD. OBVIOUSLY WE MADE A MISTAKE IF YOU ARE READING THIS
I need to reset the auto_increment in a table full of data. I had a problem recently where some script was putting InvoiceID numbers into an auto_increment CustID column...I since fixed the problem and corrected the data but I now have a huge gap in my number sequence and I cant get

Re: Resetting the auto_increment to start from 1

2003-01-09 Thread Octavian Rasnita
PROTECTED] To: Octavian Rasnita [EMAIL PROTECTED]; MySQL [EMAIL PROTECTED] Sent: Wednesday, January 08, 2003 9:26 PM Subject: Re: Resetting the auto_increment to start from 1 At 9:33 +0200 1/8/03, Octavian Rasnita wrote: Hi all, I've read the following in a MySQL book: A special case of record

Re: Resetting the auto_increment to start from 1

2003-01-09 Thread Stefan Hinz, iConnect \(Berlin\)
for calling the brand new MySQL Cookbook an old book! :/ TRUNCATE TABLE tbl This will in fact do a DROP/CREATE, thus resetting the AUTO_INCREMENT counter etc. Not always! Try this script: CREATE TABLE t (i INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY) TYPE = INNODB; INSERT INTO t SET i = NULL

Resetting the auto_increment to start from 1

2003-01-08 Thread Octavian Rasnita
, I've tried that sql statement, but the auto_increment point of start was not reset to 1. I use MySQL 4.05 under Windows 2000. Thanks. Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Before posting, please

Re: Resetting the auto_increment to start from 1

2003-01-08 Thread Paul DuBois
: DELETE FROM tbl_name WHERE 1 0; --- Well, I've tried that sql statement, but the auto_increment point of start was not reset to 1. Note that the text in question says *may* be reset to 1. To reset it for sure, use the statement at the top of page 558. :-) I use MySQL 4.05 under Windows

Re: Resetting the auto_increment to start from 1

2003-01-08 Thread Stefan Hinz, iConnect \(Berlin\)
. To do the latter, use TRUNCATE TABLE tbl This will in fact do a DROP/CREATE, thus resetting the AUTO_INCREMENT counter etc. Well, I've tried that sql statement, but the auto_increment point of start was not reset to 1. Actually, the counter is reset to 0, not 1. The first inserted value

Re: Resetting the auto_increment to start from 1

2003-01-08 Thread Paul DuBois
TABLE tbl This will in fact do a DROP/CREATE, thus resetting the AUTO_INCREMENT counter etc. Not always! Try this script: DROP TABLE IF EXISTS t; CREATE TABLE t (i INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY) TYPE = INNODB; INSERT INTO t SET i = NULL; INSERT INTO t SET i = NULL; INSERT INTO t

replication and auto_increment

2002-12-19 Thread Maxime LEMAIRE
hi, i would like to create a dual master/slave replication with mysql i think i wouldn't have any problem but i wonder how mysql manage auto_increment id ... how it works ? maxime - Before posting, please check: http

RE: replication and auto_increment

2002-12-19 Thread Maxime LEMAIRE
the goal of this architecture is to prevent to lose data i don't know if it's possible with mysql (that depends of internal auto_increment id management) -Message d'origine- De : gerald_clark [mailto:[EMAIL PROTECTED]] Envoye : jeudi 19 decembre 2002 16:59 A : [EMAIL PROTECTED] Objet : Re

re: ALTER a auto_increment column

2002-12-17 Thread Egor Egorov
On Tuesday 17 December 2002 03:09, Lopez David E-r9374c wrote: Problem is type SMALLINT needs to be MEDIUMINT (MyISAM). column: id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT My solution is to use the following ALTER statement: ALTER TABLE messages CHANGE id id MEDIUMINT UNSIGNED

Re: Fwd: Re: Bug in auto_increment

2002-12-16 Thread Michael T. Babcock
Paul DuBois wrote: manner. AUTO_INCREMENT columns are for use only with *positive* integers, and any attempt to use them otherwise will eventually cause you grief. Just to point out, a lot of people get confused about the definition of positive integers, especially in how it relates to zero

Re: Fwd: Re: Bug in auto_increment

2002-12-16 Thread Steve Yates
to. From your post you appear to be trying to assign a value to the auto_increment which defeats its purpose. I would suggest tracking the current ID for this table in another table, then inserting it yourself. Remember to lock the second table to prevent two sessions from using the same number

ALTER a auto_increment column

2002-12-16 Thread Lopez David E-r9374c
Guru's Problem is type SMALLINT needs to be MEDIUMINT (MyISAM). column: id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT My solution is to use the following ALTER statement: ALTER TABLE messages CHANGE id id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT My question is: what happens

Fwd: Re: Bug in auto_increment

2002-12-15 Thread Dennis Schwerdel
I think you did not properly process this request. Dennis Schwerdel Date: Sun, 15 Dec 2002 20:51:14 +0100 From: [EMAIL PROTECTED] To: Dennis Schwerdel [EMAIL PROTECTED] Subject: Re: Bug in auto_increment X-WEBDE-TAG: S Sender: [EMAIL PROTECTED] Your message cannot be posted to [EMAIL

Re: Fwd: Re: Bug in auto_increment

2002-12-15 Thread Paul DuBois
At 22:42 +0100 12/15/02, Dennis Schwerdel wrote: I think you did not properly process this request. The phenomenon you describe below is not a bug in MySQL. The problem is that you are trying to use an AUTO_INCREMENT column in an unsupported manner. AUTO_INCREMENT columns are for use only

re: Newbie - auto_increment multiple table insert help

2002-12-12 Thread Victoria Reznichenko
On Thursday 12 December 2002 07:23, Max Clark wrote: I would like to run an insert query across two tables at the same time. The first table has a primary key that is auto_increment, the second table needs to insert the primary key from the first table as a reference? How do I auto-populate

Newbie - auto_increment multiple table insert help

2002-12-11 Thread Max Clark
Hi- I would like to run an insert query across two tables at the same time. The first table has a primary key that is auto_increment, the second table needs to insert the primary key from the first table as a reference? How do I auto-populate the tableId field with the correct entry from

Re: Using AUTO_INCREMENT like SEQUENCE - Resolved

2002-11-07 Thread Joseph Bueno
Tomasi [mailto:Chuck.Tomasi;plexus.com] Sent: Monday, October 21, 2002 7:19 AM To: [EMAIL PROTECTED] Subject: RE: Using AUTO_INCREMENT like SEQUENCE - Resolved This past weekend the solution came to me. Simple, but elegant (well not as elegant as using the auto_increment feature natively

Re: InnoDB and auto_increment fields

2002-10-28 Thread Pete Harlan
stored? Why isn't this done automatically as it is for [ISAM] tables? As for the why, I'm not a MySQL developer, but I believe the reason goes something like this: When ISAM tables were implemented, they did it the wrong way. When other table types came along, they fixed this bug and do it the

Re: InnoDB and auto_increment fields

2002-10-28 Thread Chris Boget
stored? Why isn't this done automatically as it is for [ISAM] tables? As for the why, I'm not a MySQL developer, but I believe the reason goes something like this: When ISAM tables were implemented, they did it the wrong way. When other table types came along, they fixed this bug and do it

InnoDB and auto_increment fields

2002-10-25 Thread Chris Boget
sql, query (*sigh*, I hate this filter) I have an auto_increment key set up on my InnoDB table. Whenever I delete all the records, the number isn't reset. However, for my ISAM tables, whenever I delete all the records, the auto_increment number is reset. Is there a reason for this in InnoDB

Re: InnoDB and auto_increment fields

2002-10-25 Thread Dyego Souza do Carmo
DobrĂ½ den, sexta-feira, 25 de outubro de 2002, 14:26:05, napsal jste: CB sql, query (*sigh*, I hate this filter) CB I have an auto_increment key set up on my InnoDB table. CB Whenever I delete all the records, the number isn't reset. CB However, for my ISAM tables, whenever I delete all the CB

Re: InnoDB and auto_increment fields

2002-10-25 Thread Chris Boget
CB However, for my ISAM tables, whenever I delete all the CB records, the auto_increment number is reset. CB Is there a reason for this in InnoDB? Is there a way that I CB can reset the auto_increment number when all the records CB are deleted? try exec this query: alter table TABLE_NAME

Re: InnoDB and auto_increment fields

2002-10-25 Thread Paul DuBois
At 11:26 -0500 10/25/02, Chris Boget wrote: sql, query (*sigh*, I hate this filter) I have an auto_increment key set up on my InnoDB table. Whenever I delete all the records, the number isn't reset. However, for my ISAM tables, whenever I delete all the records, the auto_increment number

Question about AUTO_INCREMENT

2002-10-23 Thread Romans Stepanovs
Hello, I'm a newbie in MySQL and also in this mailing list. I've a problem and I hope some gurus can help me. So the question is: How to obtain an index of the row which is inserted ? for example : INSERT INTO some_tbl (ID,field1) VALUES ('','blahblahblah'); I need 'ID' to use as reference value

RE: Question about AUTO_INCREMENT

2002-10-23 Thread Ed Carp
From http://www.mysql.com/doc/en/Miscellaneous_functions.html: LAST_INSERT_ID([expr]) Returns the last automatically generated value that was inserted into an AUTO_INCREMENT column. See section 8.4.3.126 mysql_insert_id(). mysql SELECT LAST_INSERT_ID(); - 195 The last ID

RE: Question about AUTO_INCREMENT

2002-10-23 Thread Romans Stepanovs
to MySQL each time to execute query... Thanks again, Roman -Original Message- From: Ed Carp [mailto:erc;pobox.com] Sent: Thursday, October 24, 2002 2:49 AM To: Romans Stepanovs; [EMAIL PROTECTED] Subject: RE: Question about AUTO_INCREMENT From http://www.mysql.com/doc/en

Re: Using AUTO_INCREMENT like SEQUENCE - Resolved

2002-10-21 Thread Paul DuBois
At 16:57 +0200 10/21/02, Joseph Bueno wrote: Hi all, Sorry to jump in the middle of this thread but there is a much simpler way to generate sequence numbers: You create an auxiliary table with a one row: CREATE TABLE sequence ( code int(11) DEFAULT '0' NOT NULL ); INSERT INTO sequence VALUES

Using AUTO_INCREMENT like SEQUENCE

2002-10-18 Thread Chuck Tomasi
everything I can find out AUTO_INCREMENT values, but I can't seem to reproduce the same functionality without causing some possible conflict condition where two people may get the same numbers. At the heart of the matter is a Perl sub I call GetCounter(). It accepts a sequence name, pulls a value

Re: Using AUTO_INCREMENT like SEQUENCE

2002-10-18 Thread Peter Brawley
Chuck, last_insert_id() is per-connection. How do you see two users getting the same auto_increment value? PB - - Original Message - From: Chuck Tomasi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 18, 2002 9:07 AM Subject: Using AUTO_INCREMENT like SEQUENCE

re: Re: AUTO_INCREMENT max value...

2002-10-10 Thread Victoria Reznichenko
Bill, Wednesday, October 09, 2002, 6:55:26 PM, you wrote: BH Nope - nothing close to 4GB or even 1GB... My greatest data file size BH is 80MB. The largest table is 1.7 million rows. I have databases with BH more and bigger files. I think my problem is that the table having the BH problem

Re: AUTO_INCREMENT max value...

2002-10-09 Thread Joseph Bueno
Bill Hess wrote: Hello all... What is the maximum value of an AUTO_INCREMENT field? I am currently running into a maximum value of 296,995,724 on Solaris 8 using MySQL 3.23.42 - the field has been defined as an INT(11), which should be able to handle a value bigger than what I am seeing

Re: AUTO_INCREMENT max value...

2002-10-09 Thread Ken Menzel
of the MYD or MYI file. You can use the ALTER statement to add this option to the table. Hope this helps, Ken - Original Message - From: Bill Hess [EMAIL PROTECTED] To: Keith C. Ivey [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, October 08, 2002 4:52 PM Subject: Re: AUTO_INCREMENT

Re: AUTO_INCREMENT max value...

2002-10-09 Thread Bill Hess
: Tuesday, October 08, 2002 4:52 PM Subject: Re: AUTO_INCREMENT max value... Not really getting errors but getting warnings when inserting records and having duplicate values since the primary key is the one that is auto incremented... Keith C. Ivey wrote: On 8 Oct 2002, at 12:23, Bill Hess

Re: AUTO_INCREMENT max value...

2002-10-09 Thread Keith C. Ivey
On 9 Oct 2002, at 11:55, Bill Hess wrote: One would think that the value would not top out until 2^31 since I have it defined as a normal INT. I guess I can make it a BIGINT, but I think I will run into a problem eventually regardless how big I make the field... Since the limit you're

AUTO_INCREMENT max value...

2002-10-08 Thread Bill Hess
Hello all... What is the maximum value of an AUTO_INCREMENT field? I am currently running into a maximum value of 296,995,724 on Solaris 8 using MySQL 3.23.42 - the field has been defined as an INT(11), which should be able to handle a value bigger than what I am seeing - The DuBois MySQL

Re: AUTO_INCREMENT max value...

2002-10-08 Thread Keith C. Ivey
On 8 Oct 2002, at 12:23, Bill Hess wrote: What is the maximum value of an AUTO_INCREMENT field? I am currently running into a maximum value of 296,995,724 on Solaris 8 using MySQL 3.23.42 - the field has been defined as an INT(11), which should be able to handle a value bigger than what

Re: AUTO_INCREMENT max value...

2002-10-08 Thread gerald_clark
Did you try unsigned int? Bill Hess wrote: Hello all... What is the maximum value of an AUTO_INCREMENT field? I am currently running into a maximum value of 296,995,724 on Solaris 8 using MySQL 3.23.42 - the field has been defined as an INT(11), which should be able to handle a value

Re: AUTO_INCREMENT max value...

2002-10-08 Thread Bill Hess
Not really getting errors but getting warnings when inserting records and having duplicate values since the primary key is the one that is auto incremented... Keith C. Ivey wrote: On 8 Oct 2002, at 12:23, Bill Hess wrote: What is the maximum value of an AUTO_INCREMENT field? I am

RE: Auto_increment

2002-09-05 Thread David Jenkins
MySQL Can the AUTO_INCREMENT feature be used to control a sequential number list that re-uses numbers that are subsequently removed ? Cheers Dave. - Before posting, please check: http://www.mysql.com/manual.php

Re: RE: Auto_increment

2002-09-05 Thread Egor Egorov
David, Thursday, September 05, 2002, 12:45:33 AM, you wrote: DJ Can the AUTO_INCREMENT feature be used to control a sequential number list DJ that re-uses numbers that are subsequently removed ? You can insert another rows with the same auto_increment value as in deleted row, if you directly

auto_increment fields

2002-08-29 Thread Ilyas Keser
How many auto_increment fields can I have in a database? Thanks ilyas filter:mysql - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive

RE: mysqldump on tables which use auto_increment

2002-08-27 Thread Chris Barnes
Hi, I have a database which a few tables which have a few fields set with auto_increment and i'm having alot of trouble restoring the backup because the backup recreates the table with the auto_increment field, but when it tries to enter the data back into the table it cant because it is trying

Re: mysqldump on tables which use auto_increment

2002-08-27 Thread Gerald Clark
use the -f option to ignore the duplicates. Chris Barnes wrote: Hi, I have a database which a few tables which have a few fields set with auto_increment and i'm having alot of trouble restoring the backup because the backup recreates the table with the auto_increment field, but when it tries

Re: LOAD DATA, \N, and auto_increment

2002-08-20 Thread Michael Widenius
Hi! Benjamin == Benjamin Pflugmann [EMAIL PROTECTED] writes: cut Benjamin How-to-repeat: shell cat /tmp/in EOF Benjamin 1 Benjamin 2 Benjamin \N Benjamin \N Benjamin 10 Benjamin \N Benjamin EOF shell chmod a+r /tmp/in mysql CREATE TABLE ntest2 ( a INT UNSIGNED NOT NULL AUTO_INCREMENT

LOAD DATA, \N, and auto_increment

2002-08-18 Thread Andrew Rucker Jones
using LOAD DATA [LOCAL] INFILE, if the table has a column that is BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY and the infile uses \N for that column, a warning is generated for every line inserted. Replacing \N with numbers in the infile gets rid of all warnings on import. Seems

Re: LOAD DATA, \N, and auto_increment

2002-08-18 Thread Benjamin Pflugmann
. Perhaps it is a conscious decision, but it would seem an odd one: When using LOAD DATA [LOCAL] INFILE, if the table has a column that is BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY and the infile uses \N \N means NULL with LOAD DATA. So you try

Re: LOAD DATA, \N, and auto_increment

2002-08-18 Thread Paul DuBois
. Perhaps it is a conscious decision, but it would seem an odd one: When using LOAD DATA [LOCAL] INFILE, if the table has a column that is BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY and the infile uses \N \N means NULL with LOAD DATA. So you try to insert

Re: LOAD DATA, \N, and auto_increment

2002-08-18 Thread Benjamin Pflugmann
are on the same machine and communicate via a Unix domain socket. Perhaps it is a conscious decision, but it would seem an odd one: When using LOAD DATA [LOCAL] INFILE, if the table has a column that is BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY and the infile uses \N

AUTO_INCREMENT PROBLEM

2002-08-16 Thread delz
Hi All, Good day !!! I'm using phpmyadmin to create database on Mysql server. I want my idx to start at 1800 then implement auto increment. How do i do it using phpmyadmin? Regards, Delz, - Before posting, please check:

AUTO_INCREMENT problem

2002-08-02 Thread Alex Jarvis
I've written a C program which inserts new entries into a table with an auto_incremented column. In testing it I created several entries, which I then deleted by connecting to mysql from the unix command line. The problem is, when I reset the last_insert_id from the mysql prompt, it

Re: 4.0.2 Replication problem w/ AUTO_INCREMENT columns?

2002-07-27 Thread Heikki Tuuri
] Newsgroups: mailing.database.mysql Sent: Saturday, July 27, 2002 4:15 AM Subject: 4.0.2 Replication problem w/ AUTO_INCREMENT columns? Hello all, We're experiencing a bit of difficulty replicating from a 4.0.2 master on Linux to a 4.0.2 slave on Linux. Most of our tables, including the one

4.0.2 Replication problem w/ AUTO_INCREMENT columns?

2002-07-26 Thread Jon Frisby
Hello all, We're experiencing a bit of difficulty replicating from a 4.0.2 master on Linux to a 4.0.2 slave on Linux. Most of our tables, including the one that's giving us headaches are InnoDB. My colleague encountered the problem, his description follows: It seems to barf on auto_increment

Re: Rewind the auto_increment index?

2002-07-18 Thread Erick Papadakis
sql,query hello. let us say i have a table: customers idint(10) auto_increment name varchar(20) whenever i do, insert into customers (name) values ('...'); it automatically generates the id, right? that is the meaning of the auto_increment

Re: Re: Rewind the auto_increment index?

2002-07-18 Thread Egor Egorov
Erick, Thursday, July 18, 2002, 10:17:12 AM, you wrote: let us say i have a table: customers idint(10) auto_increment name varchar(20) whenever i do, insert into customers (name) values ('...'); it automatically generates the id, right

Re: auto_increment

2002-07-15 Thread Brian Reichert
On Sun, Jul 14, 2002 at 07:21:59PM +0200, Raymond Hamaker wrote: Hi all, When i use MS access 2000 with odbc to fill my MySQL db(running on linux) auto_increment seems not to work . Does not seem to work doesn't help us help you. What did you try to do? What did you expect to happen

auto_increment

2002-07-14 Thread Raymond Hamaker
Hi all, When i use MS access 2000 with odbc to fill my MySQL db(running on linux) auto_increment seems not to work . Is that normal? Or am i missing something? TIA Raymond - Before posting, please check: http

Re: Bug with AUTO_INCREMENT

2002-07-12 Thread Victoria Reznichenko
Steve, Wednesday, July 10, 2002, 11:12:48 AM, you wrote: SH Continuing my troubles with AUTO_INCREMENT (which nobody has yet SH responded to), I've now ruled the Perl DBI out of the equation and SH reproduced the same problem using the mysql.exe command-line tool. SH Hopefully somebody

Re: Bug with AUTO_INCREMENT

2002-07-12 Thread Steve Hay
Victoria Reznichenko wrote: Steve, Wednesday, July 10, 2002, 11:12:48 AM, you wrote: SH The bug can be reproduced as follows: SH Create the following simple database containing just one BDB table: SH CREATE DATABASE test; SH CREATE TABLE foo ( SHid INT NOT NULL AUTO_INCREMENT

Re: Bug with AUTO_INCREMENT

2002-07-12 Thread Steve Hay
is required by the software that I'm working on. | | In fact, it seems that BDB tables work too if the transaction support is | not used, i.e. set AUTOCOMMIT=1 and don't bother with explicit COMMIT | statements. | | Maybe MySQL has a problem with AUTO_INCREMENT when used with transactions

Bug with AUTO_INCREMENT

2002-07-10 Thread Steve Hay
Hi, Continuing my troubles with AUTO_INCREMENT (which nobody has yet responded to), I've now ruled the Perl DBI out of the equation and reproduced the same problem using the mysql.exe command-line tool. Hopefully somebody will be tempted to help this time now that there is no Perl involved

Re: AUTO_INCREMENT problem even worse!

2002-07-10 Thread Steve Hay
. The error that I'm getting refers to key 1, which is the 'id' column. You'll note that I'm not specifying a value for the 'id' column - I leave it up to the database to choose a value itself (it is an AUTO_INCREMENT column) and it keeps wrongly choosing a value that is already used. I'd say

Re: Bug with AUTO_INCREMENT

2002-07-10 Thread Richard Fox
Can your INT id be overflowing, i.e. reaches the max value for int and starting at 1 again? Rich - Original Message - From: Steve Hay [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 10, 2002 4:12 AM Subject: Bug with AUTO_INCREMENT Hi, Continuing my troubles

Re: Bug with AUTO_INCREMENT

2002-07-10 Thread Steve Hay
over after some particular number of iterations - it falls over at different, apparently random, times each time I try the test. - Steve - Original Message - From: Steve Hay [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 10, 2002 4:12 AM Subject: Bug with AUTO_INCREMENT Hi

Re: Bug with AUTO_INCREMENT

2002-07-10 Thread Steve Hay
Thomas Spahni wrote: Steve, I tried your example on MyIsam tables; no problems with auto_increment at all, except for a few ERROR 1040: Too many connections when 100 scripts are inserting concurrently at full speed. Thomas I've tried the same myself on MyISAM tables as well now, and I also

Re: Bug with AUTO_INCREMENT

2002-07-10 Thread Thomas Spahni
of the maximum INT, and (b) it doesn't always fall over after some particular number of iterations - it falls over at different, apparently random, times each time I try the test. - Steve Steve, I tried your example on MyIsam tables; no problems with auto_increment at all, except for a few ERROR

Re: Bug with AUTO_INCREMENT

2002-07-10 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Steve Hay wrote: | Thomas Spahni wrote: | | Steve, | | I tried your example on MyIsam tables; no problems with auto_increment at | all, except for a few | | ERROR 1040: Too many connections | | when 100 scripts are inserting concurrently at full

AUTO_INCREMENT problem even worse!

2002-07-09 Thread Steve Hay
Hi, I've continued trying to solve the problem that I emailed yesterday regarding AUTO_INCREMENT, and I just seem to be going backwards. The sample database/software that I sent yesterday had a UNIQUE constraint and a couple of SELECT statements. I thought that removing them bizarrely made

Error with AUTO_INCREMENT and UNIQUE

2002-07-08 Thread Steve Hay
Hi, I'm having trouble trying to INSERT rows into a table which has an AUTO_INCREMENT PRIMARY KEY column plus a UNIQUE constraint on two other columns. For each INSERT I specify NULL for the AUTO_INCREMENT column to let the database assign a value automatically, but I frequently get

Re: Fix holes in auto_increment field

2002-07-05 Thread Patrick Sherrill
If you are not using auto_increment for referential integrity, you could dump your table structure,export all cols but your auto increment, drop your table and re-import your table structure and data. Your idea should also work if you run an ALTER TABLE and DROP INDEX first, then your UPDATE

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-04 Thread Eric Frazier
*not* implemented such a system, but this could work, depending on your app. sean - Original Message - From: Eric Frazier [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 03, 2002 2:32 PM Subject: Re: AUTO_INCREMENT with Replication Well. Good to know. So I guess the only alternative

Re: AUTO_INCREMENT with Replication

2002-07-04 Thread Marc Prewitt
:) 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 was available in mysql). Here's what we're using

RE: AUTO_INCREMENT with Replication

2002-07-04 Thread Madscientist
We use a strategy of giving each node a unique ID and using the combination of the NodeId and the AUTO_INCREMENT value as the key for the objects. The AUTO_INCREMENT field ensures uniqueness between records in a single node. The NodeID ensures uniqueness between nodes. This way nodes

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 person

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 master web database that gets

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 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 are

Re: auto_increment and clustering sequence

2002-06-22 Thread Paul DuBois
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 tables. You can control the order in which

<    1   2   3   4   5   6   7   >