2013/3/13 Reindl Harald h.rei...@thelounge.net:
Am 12.03.2013 22:34, schrieb spameden:
NOTE: AUTO_INCREMENT is 32768 instead of 17923 ! So next inserted row
would have pc_id=32768.
Please suggest if it's normal behavior or not
what do you expect if a PRIMARY KEY record get's removed?
re
Furthermore I've tested on 133K records and AUTO_INCREMENT field in
the end had the value of 234076.
mysql select count(*) from billing.phone_codes;
+--+
| count(*) |
+--+
| 12 |
+--+
1 row in set (0.02 sec)
AUTO_INCREMENT=234076
So it basically means If I have
|
+---+-+
| test | CREATE TABLE `test` (
`pc_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`pc_type` enum('ABC','DEF') DEFAULT NULL,
PRIMARY KEY (`pc_id`)
) ENGINE=InnoDB AUTO_INCREMENT=17923 DEFAULT CHARSET=utf8
Nevermind, I've found the bug:
http://bugs.mysql.com/bug.php?id=57643
I'm gonna subscribe for it and see if it's gonna be resolved.
Many thanks guys for all your assistance!
2013/3/13 spameden spame...@gmail.com:
2013/3/13 Rick James rja...@yahoo-inc.com:
AUTO_INCREMENT guarantees
2013/3/13 Rick James rja...@yahoo-inc.com:
AUTO_INCREMENT guarantees that it will not assign the same number twice.
That's about all it is willing to guarantee.
With InnoDB, if a transaction starts, uses an auto_inc value, then rolls
back, that id is lost.
True, but if you do not specify
What settings? (innodb_autoinc_lock_mode comes to mind, but there may be
others.)
It is acceptable, by the definition of AUTO_INCREMENT, for it to burn the
missing 15K ids.
-Original Message-
From: spameden [mailto:spame...@gmail.com]
Sent: Tuesday, March 12, 2013 2:34 PM
in set (0.00 sec)
It is acceptable, by the definition of AUTO_INCREMENT, for it to burn the
missing 15K ids.
I don't get this explanation, could you please explain bit more? So
it's completely normal for AUTO_INCREMENT field to act like this?
-Original Message-
From: spameden
AUTO_INCREMENT guarantees that it will not assign the same number twice.
That's about all it is willing to guarantee.
With InnoDB, if a transaction starts, uses an auto_inc value, then rolls back,
that id is lost.
When you have multiple threads loading data into the same table, diff values
|
+---+-+
| test | CREATE TABLE `test` (
`pc_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`pc_type` enum('ABC','DEF') DEFAULT NULL,
PRIMARY KEY (`pc_id`)
) ENGINE=InnoDB AUTO_INCREMENT=17923 DEFAULT CHARSET=utf8
Am 12.03.2013 22:34, schrieb spameden:
NOTE: AUTO_INCREMENT is 32768 instead of 17923 ! So next inserted row
would have pc_id=32768.
Please suggest if it's normal behavior or not
what do you expect if a PRIMARY KEY record get's removed?
re-use the same primary key?
this is not the way
-Original Message-
From: Lucio Chiappetti [mailto:lu...@lambrate.inaf.it]
Sent: Thursday, October 06, 2011 3:18 AM
To: Jerry Schwartz
Cc: Mysql List
Subject: RE: How MyISAM handle auto_increment
On Wed, 5 Oct 2011, Jerry Schwartz wrote:
Can't you use
CREATE TABLE LIKE
On Wed, 5 Oct 2011, Jerry Schwartz wrote:
Can't you use
CREATE TABLE LIKE
and then reset the auto-increment value?
Thanks. Since when does create table like exist? I was unaware of it,
but I see it exists in mysql 5.1. The tricks I described worked since 3.x
or thereabouts.
--
On Mon, 3 Oct 2011, Reindl Harald wrote:
I have questions regarding how MyISAM handles auto_increment clolumn?
it is a table-property and you hould NOT touch it without godd reasons
because it is named AUTO
I guess there are quite often good reasons to change it, which can be
done e.g
Hi, Folks:
I have questions regarding how MyISAM handles auto_increment clolumn?
1. is there a auto_increment counter for MyISAM to assign a new value to
auto_increment columns?
2. if MyISAM has the counter, is the counter stored in memory or disk?
Thnaks
At 04:46 PM 10/3/2011, you wrote:
Hi, Folks: I have questions regarding how MyISAM handles
auto_increment clolumn? 1. is there a auto_increment counter for
MyISAM to assign a new value to auto_increment columns?
Yes
2. if MyISAM has the counter, is the counter stored in memory or
disk
Thanks, what about if mysqld restart, does auto_increment gets reset ?
I saw this happened to Innodb, if table is empty and server restart,
auto_incremnet gets reset to 0
From: mos mo...@fastmail.fm
To: mysql@lists.mysql.com
Sent: Monday, October 3, 2011 3:01
Am 03.10.2011 23:46, schrieb Angela liu:
Hi, Folks:
I have questions regarding how MyISAM handles auto_increment clolumn?
1. is there a auto_increment counter for MyISAM to assign a new value to
auto_increment columns?
2. if MyISAM has the counter, is the counter stored in memory
At 06:21 PM 10/3/2011, Angela liu wrote:
Thanks, what about if mysqld restart, does auto_increment gets reset ?
No. The next auto increment value stays with the table. As another
person already stated, you should never manually change the auto
increment value on a table that already has
- Original Message -
From: crocket crockabisc...@gmail.com
I had 19 rows in series table. And when I tried inserting the 20th
row, the auto_increment value suddenly increased from 20 to 32, and
the new row has 20 as series_id.
The first thing that comes to mind, is transactions
Below is the definition of the table with the problem.
CREATE TABLE `series` (
`series_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(200) NOT NULL,
PRIMARY KEY (`series_id`)
) ENGINE=InnoDB
I had 19 rows in series table. And when I tried inserting the 20th
row
Is there a way to set the auto-increment for a particular table to increase by
some number more than one, like maybe 10?
Thanks in advance,
Jim McNeely
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
Den 23-02-2011 18:41, Jim McNeely skrev:
Is there a way to set the auto-increment for a particular table to increase by
some number more than one, like maybe 10?
Thanks in advance,
Jim McNeely
CREATE TABLE t (
...
) AUTO_INCREMENT=10;
/ Carsten
--
MySQL General Mailing List
For list
On 2/23/2011 12:41, Jim McNeely wrote:
Is there a way to set the auto-increment for a particular table to increase by
some number more than one, like maybe 10?
Thanks in advance,
Jim McNeely
The manual is your friend. Don't be afraid of it :)
I have read the manual, and you're right, the auto-increment_increment is a
system wide setting. I only want this on one table. I am in this instance
creating ID's for a separate system via HL7 for a Filemaker system, and
FileMaker is too lame and slow to actually spit out an ID in time for the
wrote:
Den 23-02-2011 18:41, Jim McNeely skrev:
Is there a way to set the auto-increment for a particular table to increase
by some number more than one, like maybe 10?
Thanks in advance,
Jim McNeely
CREATE TABLE t (
...
) AUTO_INCREMENT=10;
/ Carsten
--
MySQL General
Am 23.02.2011 22:29, schrieb Jim McNeely:
I have read the manual, and you're right, the auto-increment_increment is a
system wide setting
No, scope session means set VAR=value
Command-Line Format --auto_increment_increment[=#]
Option-File Format auto_increment_increment
Option Sets
Am 23.02.2011 22:55, schrieb Singer X.J. Wang:
Yes, you can set it up so that it increases it by X only for that statement..
eg.
[other stuff]
set auto_increment_increment = X;
insert into that table you want
set auto_increment_increment = 1;
[other stuff]
Now you have to remmeber
Hi.
You can show us your show create table statement as well.
杨涛
我博客1:http://yueliangdao0608.cublog.cn
My 我博客2:http://yueliangdao0608.blog.51cto.com
2010/12/20 Xavier Correyeur x.correy...@free.fr
Hi everybody !
A have a discontinued AUTO_INCREMENT sequence when i insert data in a table
://yueliangdao0608.blog.51cto.com
2010/12/20 Xavier Correyeur x.correy...@free.fr
Hi everybody !
A have a discontinued AUTO_INCREMENT sequence when i insert data in a
table
with a 100 (or more) items SELECT request.
The problem (or situation) is reproductible, you can see an example
below
...@free.fr; mysql@lists.mysql.com
Sent: Tue, 21 December, 2010 3:28:00 PM
Subject: Re: Discontinued AUTO_INCREMENT problem
Too curious...could you share a SHOW CREATE TABLE from this table as
requested before?
Best regards.
--
Wagner Bianchi
2010/12/21 杨涛涛 david.y...@actionsky.com
Hi.
You
Sent: Tue, 21 December, 2010 3:28:00 PM
Subject: Re: Discontinued AUTO_INCREMENT problem
Too curious...could you share a SHOW CREATE TABLE from this table as
requested before?
Best regards.
--
Wagner Bianchi
2010/12/21 杨涛涛 david.y...@actionsky.com
Hi.
You can show us your show
Hi everybody !
A have a discontinued AUTO_INCREMENT sequence when i insert data in a
table with a 100 (or more) items SELECT request.
The problem (or situation) is reproductible, you can see an example below.
Anybody could explain this to me ?
Cheers
XC
My MySQL version : Ver 14.14 Distrib
ALTER TABLE sometable AUTO_INCREMENT = 1000;
On 10/17/2010 07:03 AM, short cutter wrote:
Hi,
Is it possible to change this directive's value without modifition to
my.cnf and restart mysqld?
I remember there is a set @@variable syntax, but not sure.
Thanks.
2010/10/17 mosmo...@fastmail.fm
Hello,
I have a table which has the ID key with auto_increment and which is a
primary key.
If I insert the table with the id value which is generated by the
program, for example,
insert table (id, user_name, age) values (1000, 'kenn', 30);
the value 1000 is inserted forcely, not generated
At 08:05 PM 10/16/2010, you wrote:
Hello,
I have a table which has the ID key with auto_increment and which is a
primary key.
If I insert the table with the id value which is generated by the
program, for example,
insert table (id, user_name, age) values (1000, 'kenn', 30);
the value 1000
At 08:55 PM 10/16/2010, you wrote:
After executing the SQL statement, the next Id inserted will be 1000.
Oops. I meant :
After executing the SQL statement, the next Id inserted will be 1001.
Mike
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To
Hi,
Is it possible to change this directive's value without modifition to
my.cnf and restart mysqld?
I remember there is a set @@variable syntax, but not sure.
Thanks.
2010/10/17 mos mo...@fastmail.fm:
At 08:55 PM 10/16/2010, you wrote:
After executing the SQL statement, the next Id inserted
Hi,
Is there any way to set the auto_increment value with the variable like
below.
mysql set @id=10;
mysql alter table suresh_copy auto_increme...@id;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax
Hi,
I have problem in the insertion of 0 in auto_increment.
I have set in my.ini file as follows,
sql-mode=STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,
NO_ENGINE_SUBSTITUTION,NO_AUTO_VALUE_ON_ZERO
Even now the auto increment filed is not allows to insert a zero; If i insert
zero, 1 is getting
, 2010 6:05 PM
To: mysql@lists.mysql.com
Subject: auto_increment weirdness
Hi, for some reason, I have an auto_increment field that's magically
bumped up to the next biggest power of 2 after a big INSERT...SELECT
that inserts a bunch of tuples (into an empty table). Is this expected
behavior
Reproduced in 5.1.43. Could not reproduce it in 5.0.66
-Original Message-
From: Yang Zhang [mailto:yanghates...@gmail.com]
Sent: Wednesday, February 17, 2010 6:05 PM
To: mysql@lists.mysql.com
Subject: auto_increment weirdness
Hi, for some reason, I have an auto_increment field that's
Hi, for some reason, I have an auto_increment field that's magically
bumped up to the next biggest power of 2 after a big INSERT...SELECT
that inserts a bunch of tuples (into an empty table). Is this expected
behavior? I couldn't find any mention of this from the docs (using the
MySQL 5.4.3 beta
: create table (myid int unsigned not null
auto_increment., unique key (myid));
but this is effectively a primary key
Only mostly true :-)
It *is* the same for MyISAM, but for InnoDB the primary key is special, as
that is the one that stores the data inline (clustered index). Additional
Yeah, Paul...
This is so clear...the auto_increment column may be indexed like:
- KEY();
- UNIQUE();
- PRIMARY KEY()
...when you create or alter a table.
--
Wagner Bianchi
2010/1/25 Paul DuBois paul.dub...@sun.com
The requirement is that it be indexed. The index need not be a primary
In innodb, is it possible to have an auto_increment field without
making it a (part of a) primary key? Why is this a requirement? I'm
getting the following error. Thanks in advance.
ERROR 1075 (42000): Incorrect table definition; there can be only one
auto column and it must be defined as a key
it's not an innodb thing:
http://dev.mysql.com/doc/refman/5.0/en/create-table.html
Note
There can be only one AUTO_INCREMENT column per table, it must be indexed, and
it cannot have a DEFAULT value. An AUTO_INCREMENT column works properly only if
it contains only positive values. Inserting
Right, I saw the docs. I'm fine with creating an index on it, but the
only way I've successfully created a table with auto_increment is by
making it a primary key. And I still don't understand why this
requirement is there in the first place.
On Mon, Jan 25, 2010 at 10:32 AM, Tom Worster f
2010/1/25 Yang Zhang yanghates...@gmail.com:
Right, I saw the docs. I'm fine with creating an index on it, but the
only way I've successfully created a table with auto_increment is by
making it a primary key. And I still don't understand why this
requirement is there in the first place.
Non
The requirement is that it be indexed. The index need not be a primary key.
mysql create table t (i int not null auto_increment, index(i)) engine innodb;
Query OK, 0 rows affected (0.45 sec)
On Jan 25, 2010, at 9:39 AM, Yang Zhang wrote:
Right, I saw the docs. I'm fine with creating an index
yah, mysql only allows one auto increment field n that's used as the
primary key in tables. I don't think it has to be the primary key as
long as it is a unique key i think that's okay.
so u should be able to do : create table (myid int unsigned not null
auto_increment., unique key (myid
Hey folks. I'm getting some weird behaviour out of Auto_increment.
If I enter a attempt to INSERT a row into a table with a UNIQUE index,
where the insert would violate uniqueness of existing data, I'm seeing
the auto_increment increase even though the insert fails.
The server in question
It will also update the auto_increment column when you ROLLBACK a failed
insert:
mysql USE test;
Database changed
mysql SELECT * FROM t1\G
Empty set (0.00 sec)
mysql DROP TABLE t1;
Query OK, 0 rows affected (0.06 sec)
mysql
mysql CREATE TABLE t1(
- id INT UNSIGNED NOT NULL AUTO_INCREMENT
Hmm, that makes sense. I should have thought of that. Thanks!
On Fri, Aug 7, 2009 at 12:32 PM, Johnny Withersjoh...@pixelated.net wrote:
It will also update the auto_increment column when you ROLLBACK a failed
insert:
mysql USE test;
Database changed
mysql SELECT * FROM t1\G
Empty set
Hi All
I have created a table.Now I need to make a field Auto_increment...Help
me with this issue..An example will do..
Regards
Jnani
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Date: Fri, 10 Apr 2009 15:15:28 +0530
From: jnaneshwar.banta...@kavach.net
To: mysql@lists.mysql.com
Subject: auto_increment Issue
Hi All
I have created a table.Now I need to make a field Auto_increment...Help
me with this issue..An example will do..
Regards
Jnani
Hi Jnani
Hi
While trying for the same,I am getting the following error
Incorrect table definition; there can be only one auto column and it
must be defined as a key
Jnani
Octavian Rasnita wrote:
Or more simple:
ALTER TABLE tbl modify id INT UNSIGNED NOT NULL AUTO_INCREMENT;
--
Octavian
Date: Fri, 10 Apr 2009 15:55:33 +0530
From: jnaneshwar.banta...@kavach.net
To: orasn...@gmail.com
CC: defati...@hotmail.com; mysql@lists.mysql.com
Subject: Re: auto_increment Issue
Hi
While trying for the same,I am getting the following error
Incorrect table definition
Hi ,
Thanks,Its working now
Jnani
abdulazeez alugo wrote:
Date: Fri, 10 Apr 2009 15:55:33 +0530
From: jnaneshwar.banta...@kavach.net
To: orasn...@gmail.com
CC: defati...@hotmail.com; mysql@lists.mysql.com
Subject: Re: auto_increment Issue
Hi
While trying for the same,I am
alter table tablename modify id int not null auto_increment primary key;
On Sat, Oct 25, 2008 at 2:48 AM, Paul [EMAIL PROTECTED] wrote:
Anybody know if there's a way to change a primary key field that is not
auto-incremented, turning on auto-increment but preserving the values
Anybody know if there's a way to change a primary key field
that is not auto-incremented, turning on auto-increment but
preserving the values that are currently in it?
TIA,
Paul W
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
You could create an extra table in order to record the max number of
widget,the the ID should alway be 1.
On Thu, Oct 16, 2008 at 2:04 AM, Rob Wultsch [EMAIL PROTECTED] wrote:
I would do a muli key PK with a after insert trigger to that would
change widget_number 1 to 1000. Just my HO...
I
but the widget table references the account table
with a foreign key on account_id:
--
CREATE TABLE `account` (
`account_id` INTEGER(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`label` VARCHAR(64) COLLATE latin1_swedish_ci NOT NULL DEFAULT '',
PRIMARY KEY (`account_id`),
UNIQUE KEY `account_id
I would do a muli key PK with a after insert trigger to that would
change widget_number 1 to 1000. Just my HO...
I would use this combo as the primary key, but I hate doing joins with
multiple primary keys, so I'll also keep the widget_id for the purpose of
making joins easier.
Why? Both of
:
Is there a set of flags for mysqldump that will include the auto_increment
specifier for columns, but leave out the AUTO_INCREMENT=x saved values?
I want to compare the schema of two versions of a database, without
considering the data. In my opinion, the saved auto increment counter is
part
Is there a set of flags for mysqldump that will include the auto_increment
specifier for columns, but leave out the AUTO_INCREMENT=x saved values?
I want to compare the schema of two versions of a database, without
considering the data. In my opinion, the saved auto increment counter is
part
You can import your data into a test database,then export the data using
statement select ... into ...
then You can complare the two.
On Tue, May 20, 2008 at 9:14 AM, Dan Lipsitt [EMAIL PROTECTED] wrote:
Is there a set of flags for mysqldump that will include the auto_increment
specifier
Hiep Nguyen schrieb:
hi list,
reading manual on mysql regarding auto_increment with multiple-column
index:
CREATE TABLE animals (
grp ENUM('fish','mammal','bird') NOT NULL,
id MEDIUMINT NOT NULL AUTO_INCREMENT,
name CHAR(30) NOT NULL,
PRIMARY KEY (grp,id)
);
INSERT
Sebastian Mendel schrieb:
Hiep Nguyen schrieb:
hi list,
reading manual on mysql regarding auto_increment with multiple-column
index:
CREATE TABLE animals (
grp ENUM('fish','mammal','bird') NOT NULL,
id MEDIUMINT NOT NULL AUTO_INCREMENT,
name CHAR(30) NOT NULL,
PRIMARY KEY
Are you sure, I just get:
CREATE TABLE ...
ERROR 1075 (42000): Incorrect table definition; there can be only one
auto column and it must be defined as a key
On version 5.0.41. What version are you using?
Hiep Nguyen wrote:
hi list,
reading manual on mysql regarding auto_increment
Ben Clewett schrieb:
Are you sure, I just get:
CREATE TABLE ...
ERROR 1075 (42000): Incorrect table definition; there can be only one
auto column and it must be defined as a key
the mentioned CREATE TABLE is fine and works
On version 5.0.41. What version are you using?
this works on
You are right, I've tried 5.0.18 and 5.0.45 which work.
There must have been a bug in 5.0.41 with which I used test the question...
I belive the question has been answered by now anyway :)
Ben
Sebastian Mendel wrote:
Ben Clewett schrieb:
Are you sure, I just get:
CREATE TABLE ...
ERROR
On Tue, 22 Apr 2008, Sebastian Mendel wrote:
Sebastian Mendel schrieb:
Hiep Nguyen schrieb:
hi list,
reading manual on mysql regarding auto_increment with multiple-column
index:
CREATE TABLE animals (
grp ENUM('fish','mammal','bird') NOT NULL,
id MEDIUMINT NOT NULL AUTO_INCREMENT
hi list,
reading manual on mysql regarding auto_increment with multiple-column
index:
CREATE TABLE animals (
grp ENUM('fish','mammal','bird') NOT NULL,
id MEDIUMINT NOT NULL AUTO_INCREMENT,
name CHAR(30) NOT NULL,
PRIMARY KEY (grp,id)
);
INSERT INTO animals (grp,name) VALUES
| is available. However, the operation is still mapped to
|DELETE| if there are foreign key constraints that reference the table.
(When fast truncate is used, it resets any |AUTO_INCREMENT| counter.
From MySQL 5.0.13 on, the |AUTO_INCREMENT| counter is reset by
|TRUNCATE TABLE|, regardless
过客 schrieb:
[...] why in procedure TRUNCATE table
demo do not reset auto_increment?
is clearly written in the documentation, just read ...
in short:
auto_increment is used for primary key, primary keys could be referenced
from another table, setting auto_increment back to 0 could lead
[...] why in procedure TRUNCATE table
demo do not reset auto_increment?
is clearly written in the documentation, just read ...
in short:
auto_increment is used for primary key, primary keys could be referenced
from another table, setting auto_increment back to 0 could lead to using
Martijn Tonies schrieb:
[...] why in procedure TRUNCATE table
demo do not reset auto_increment?
is clearly written in the documentation, just read ...
in short:
auto_increment is used for primary key, primary keys could be referenced
from another table, setting auto_increment back to 0
[...] why in procedure TRUNCATE table
demo do not reset auto_increment?
is clearly written in the documentation, just read ...
in short:
auto_increment is used for primary key, primary keys could be
referenced
from another table, setting auto_increment back to 0 could lead to
using
Martijn Tonies schrieb:
[...] why in procedure TRUNCATE table
demo do not reset auto_increment?
is clearly written in the documentation, just read ...
in short:
auto_increment is used for primary key, primary keys could be
referenced
from another table, setting auto_increment back to 0
[...] why in procedure TRUNCATE table
demo do not reset auto_increment?
is clearly written in the documentation, just read ...
in short:
auto_increment is used for primary key, primary keys could be
referenced
from another table, setting auto_increment back to 0 could lead
Martijn Tonies schrieb:
[...] why in procedure TRUNCATE table
demo do not reset auto_increment?
is clearly written in the documentation, just read ...
in short:
auto_increment is used for primary key, primary keys could be
referenced
from another table, setting auto_increment back to 0
| is available. However, the operation is still mapped to
|DELETE| if there are foreign key constraints that reference the table.
(When fast truncate is used, it resets any |AUTO_INCREMENT| counter.
From MySQL 5.0.13 on, the |AUTO_INCREMENT| counter is reset by
|TRUNCATE TABLE|, regardless of whether
*hi everyone: *
I've some puzzle with the following test:
CREATE TABLE `demo` (
`id` int(11) NOT NULL auto_increment,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
INSERT INTO demo VALUES(100);
delimiter //
create procedure test()
DETERMINISTIC
begin
On 10/24/07, Eric Frazier [EMAIL PROTECTED] wrote:
js wrote:
Hi list,
Reading How AUTO_INCREMENT Handling Works in InnoDB[1] makes me
wonder how is it possible to replicate AUTO_INCREMENTed value to slaves.
According to the doc,
If you specify an AUTO_INCREMENT column for an InnoDB
Hello,
On Oct 23, 2007, at 11:23 AM, js wrote:
Hi list,
Reading How AUTO_INCREMENT Handling Works in InnoDB[1] makes me
wonder how is it possible to replicate AUTO_INCREMENTed value to
slaves.
According to the doc,
If you specify an AUTO_INCREMENT column for an InnoDB table, the
table
Hi list,
Reading How AUTO_INCREMENT Handling Works in InnoDB[1] makes me
wonder how is it possible to replicate AUTO_INCREMENTed value to slaves.
According to the doc,
If you specify an AUTO_INCREMENT column for an InnoDB table, the
table handle in the InnoDB data dictionary contains a special
Reading How AUTO_INCREMENT Handling Works in InnoDB[1] makes me
wonder how is it possible to replicate AUTO_INCREMENTed value to slaves.
According to the doc,
If you specify an AUTO_INCREMENT column for an InnoDB table, the
table handle in the InnoDB data dictionary contains a special counter
If After delete from table where id = 4 and restart mysqld on server B,
insert into table (value) values(e) is executed on server A.
Why would you delete data from the slave?
The delete statement is for Master, not slave.
--
MySQL General Mailing List
For list archives:
Thank you for your reply.
But I couldn't under stand how --auto-increment-increment and
--auto-increment-offset
helps me avoid my problem.
Could you please explain?
On 10/24/07, Eric Frazier [EMAIL PROTECTED] wrote:
js wrote:
Hi list,
Reading How AUTO_INCREMENT Handling Works in InnoDB[1
is a primary, Not Null AUTO_INCREMENT field.
The issue is that the first auto increment number in the primary key of
TableA is the next highest value of the AUTO_INCREMENT field of tableA
instead of what I would have suspected was 1. Is this normal. Does it
matter. And will this create conflict
I have created a new table, with an auto_increment value. I would like the
first auto_increment value to be 1001. So I -
1) inserted a fake record with an id of 1000
2) alter table tblname auto_increment=1000 (with and without a fake record)
3) alter table tblname auto_increment=1001
At 5:34 PM -0500 7/15/07, Andrew Carlson wrote:
I have created a new table, with an auto_increment value. I would like the
first auto_increment value to be 1001. So I -
1) inserted a fake record with an id of 1000
2) alter table tblname auto_increment=1000 (with and without a fake record)
3
Andrew Carlson wrote:
I have created a new table, with an auto_increment value. I would
like the
first auto_increment value to be 1001. So I -
1) inserted a fake record with an id of 1000
2) alter table tblname auto_increment=1000 (with and without a fake
record)
3) alter table tblname
Hi,
Is it possible to insert values into two tables simultaneously and
have the value of one of the columns in the second table be the
auto_increment value from inserting into the first?
E.g. if table1 has an auto_increment column c1, the logic I'm looking
for would be something like:
INSERT
Hi,
Hamish Allan wrote:
Hi,
Is it possible to insert values into two tables simultaneously and
have the value of one of the columns in the second table be the
auto_increment value from inserting into the first?
No, because you can only insert into one table at a time. But you can write
On 6/11/07, Baron Schwartz [EMAIL PROTECTED] wrote:
Hi,
Hamish Allan wrote:
Hi,
Is it possible to insert values into two tables simultaneously and
have the value of one of the columns in the second table be the
auto_increment value from inserting into the first?
No, because you can only
DEFAULT ('comp-06-'::text ||
(nextval('sequenza_competenza'::regclass))::text),
descrizione character varying(100),
CONSTRAINT competenza_pkey PRIMARY KEY (id_competenza)
)
there, id_competenza is compound by a string comp-06 and the next value of a
sequence (similar to auto_increment
DEFAULT ('comp-06-'::text
||
(nextval('sequenza_competenza'::regclass))::text),
descrizione character varying(100),
CONSTRAINT competenza_pkey PRIMARY KEY (id_competenza)
)
there, id_competenza is compound by a string comp-06 and the next value
of a
sequence (similar to auto_increment
I don't think MySQL has exactly what you are looking for, but you may be able
to get the behavior you want.
The auto_increment value is actually based on an index and doesn't have to be unique. So you could create a compound index that has
one or more fields plus the auto_increment field
On Tuesday 02 January 2007 16:51 Brent Baisley's cat, walking on the keyboard,
wrote:
CREATE TABLE competenza (
competenza varchar(30) NOT NULL default 'comp-06-',
id_competenza int unsigned not null auto_increment,
descrizione varchar(100),
PRIMARY KEY (competenza, id_competenza
1 - 100 of 656 matches
Mail list logo