Robert A. Klahn wrote:
Tried to reproduce, but got expected results on:
$ uname -a
Linux quad 2.6.28-13-generic #45-Ubuntu SMP Tue Jun 30 19:49:51 UTC 2009
i686 GNU/Linux
on trunk, revno: 1097
Hope this helps......Robert.
Just to be sure, the above system is 32-bit?
-jay
On Fri, 17 Jul 2009 12:44 -0400, "Jay Pipes" <[email protected]> wrote:
Following up on this...I can't reproduce this bug on 64-bit Linux, so
I'm tempted to say it may be a 32-bit issue, but I'd like to see if
someone else who has a 32-bit system could try to reproduce it, please?
Here is the (expected and correct) results from my 64-bit Linux box:
drizzle> use test
Database changed
drizzle> create TEMPORARY table t1(id int primary key auto_increment)
engine=memory;
Query OK, 0 rows affected (0 sec)
drizzle> insert into t1 values (null);
Query OK, 1 row affected (0 sec)
drizzle> insert into t1 values (null);
Query OK, 1 row affected (0 sec)
drizzle> select * from t1;
+----+
| id |
+----+
| 1 |
| 2 |
+----+
2 rows in set (0 sec)
drizzle> alter table t1 auto_increment = 50;
Query OK, 2 rows affected (0 sec)
Records: 2 Duplicates: 0 Warnings: 0
drizzle> show create table t1;
+-------+--------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table
|
+-------+--------------------------------------------------------------------------------------------------------------------------+
| t1 | CREATE TEMPORARY TABLE `t1` (
`id` int NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
) ENGINE=MEMORY AUTO_INCREMENT=50 |
+-------+--------------------------------------------------------------------------------------------------------------------------+
1 row in set (0 sec)
drizzle> insert into t1 values (null);
Query OK, 1 row affected (0 sec)
drizzle> select * from t1;
+----+
| id |
+----+
| 1 |
| 2 |
| 50 |
+----+
3 rows in set (0 sec)
Biping MENG wrote:
Hi, Drizzlers
Here I'm suffering from a bug about auto_increment:
"alter table auto_increment" command does not work when using heap
engine (not confirmed with other engines yet)
platform:
ubuntu 9.04 desktop 32bits
trunck:
revision 1095
A session exposing the bug:
drizzle> create TEMPORARY table t1(id int primary key auto_increment)
engine=heap;
Query OK, 0 rows affected (0.03 sec)
drizzle> insert into t1 values (null);
Query OK, 1 row affected (0 sec)
drizzle> insert into t1 values (null);
Query OK, 1 row affected (0 sec)
drizzle> select * from t1;
+----+
| id |
+----+
| 1 |
| 2 |
+----+
2 rows in set (0 sec)
drizzle> alter table t1 auto_increment = 50;
Query OK, 2 rows affected (0 sec)
Records: 2 Duplicates: 0 Warnings: 0
drizzle> show create table t1;
+-------+-------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table
|
+-------+-------------------------------------------------------------------------------------------------------------------------+
| t1 | CREATE TEMPORARY TABLE `t1` (
`id` int NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
) ENGINE=MEMORY AUTO_INCREMENT=3 |
+-------+-------------------------------------------------------------------------------------------------------------------------+
1 row in set (0 sec)
drizzle> insert into t1 values (null);
Query OK, 1 row affected (0 sec)
drizzle> select * from t1;
+----+
| id |
+----+
| 1 |
| 2 |
| 3 |
+----+
3 rows in set (0 sec)
What I know by now:
1. When I run ./dtr, the alter_table test fails due to this bug.
2. As is suggested by Stewart, I added a SHOW CREATE TABLE command
right after the "ALTER TABLE t1 auto_increment=50" command (also shown
in the above session), and found that the auto_increment value is not
changed by the alter command at all.
3. I gdbed into the code with ./dtr --gdb, and found that when
executing the alter command, a new table is created and the parameter
HP_CREATE_INFO *create_info passed to the function call
HeapEngine::heap_create_table is correct, that is:
create_info->auto_increment_value == 50 && (create_info->used_fields &
HA_CREATE_USED_AUTO)
4. When I start drizzled with simplified parameters, that is
./drizzled --port=xxxx, the alter command just works fine. Then I
tried the parameters given by ./dtr, the bug recurs. It's weird. After
several tries on the parameters I found that if and only if --tmpdir
is specified, the bug recurs; otherwise not.
Not sure if there's something to do with this known bug:
https://bugs.launchpad.net/drizzle/+bug/314570
Any ideas?
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp
-----------------------------------------------------------
Robert A. Klahn [email protected] AIM: rklahn
"Hope has two beautiful daughters: Anger and Courage. Anger
at the way things are, and Courage to struggle to create
things as they should be." -- St. Augustine
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp