2013/3/13 Reindl Harald :
>
>
> 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 PR
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 ke
--+
> | Table | Create Table
>
> |
> +---+-----+
> | test | CREATE TABLE `test` (
> `pc_id` int(11)
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 valu
ws 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?
>
>> -Origin
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:3
2013/3/13 Rick James :
> 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
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 :
> 2013/3/13 Rick James :
>> AUTO_INCREMENT guarantees that it will not assi
+
| Table | Create Table
|
+---+-----+
| test | CREATE TABLE `test` (
`pc_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`pc_type` enum('ABC','DEF') DEF
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 I
>-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
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. as
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
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,
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
To: mysql@lists.mysql.com
Sent: Monday, October 3, 2011 3:01 PM
Subject: Re
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
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
- Original Message -
> From: "crocket"
>
> 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 tran
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, the
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 r
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 S
ersen 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
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
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 :)
http://dev.mysql.com/doc/refman/5.5/en/replicat
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
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:http://lists.mysql.com/mysql?unsub=arch...@jab.
ber, 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 杨涛涛
>
> > Hi.
&g
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 杨涛涛
> Hi.
> You can show us your show create table statement as well.
>
>
>
/yueliangdao0608.blog.51cto.com
>
>
> 2010/12/20 Xavier Correyeur
>
> > 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 re
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
> Hi everybody !
>
> A have a discontinued AUTO_INCREMENT sequence when i insert data in a table
>
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 mos:
At 08:
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 :
> At 08:55 PM 10/16/2010, you wrote:
>>
>> After executing the SQL statement, the next Id inserted will be 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 unsubscribe:
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
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 ge
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 syn
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
ebruary 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 magically
> bumped up to the next biggest power of 2 after a big INSERT...SELECT
> that inserts a bunch of tuples (into an
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
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
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
The requirement is that it be indexed. The index need not be a primary key.
>
>
ble to do : 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 (clu
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., u
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
2010/1/25 Yang Zhang :
> 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 pl
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
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 valu
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
Hmm, that makes sense. I should have thought of that. Thanks!
On Fri, Aug 7, 2009 at 12:32 PM, Johnny Withers wrote:
> It will also update the auto_increment column when you ROLLBACK a failed
> insert:
>
> mysql> USE test;
> Database changed
> mysql> SELECT * FROM t1
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
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 q
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_incremen
> 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
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;
>
>
> 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
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
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
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:http://lists.mysq
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 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
these tables
have a primary key 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 '',
PR
, Dan Lipsitt <[EMAIL PROTECTED]> wrote:
>
>> 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,
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
&g
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 of
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 MED
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 1
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 al
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 with
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
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,
PRIMAR
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
| 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
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 there
Martijn Tonies schrieb:
>
>>>>>>> [...] why in procedure TRUNCATE table
>>>>>>> demo do not reset auto_increment?
>>>>>> is clearly written in the documentation, just read ...
>>>>>>
>>>>>> in s
> >>>>> [...] why in procedure TRUNCATE table
> >>>>> demo do not reset auto_increment?
> >>>> is clearly written in the documentation, just read ...
> >>>>
> >>>> in short:
> >>>>
> >>>
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_
> >>> [...] 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 key
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 co
> > [...] 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 au
过客 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 l
*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
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
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 fo
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
> > 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: http://
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 co
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 sp
7; from TableA.
The null column in TableB 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
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
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
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 (with and
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?
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 a
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:
I
nuary 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)
)
Si
Hi,
> > 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)
> > )
> >
> > Since
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
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
1 - 100 of 692 matches
Mail list logo