Re: MyISAM/Blackhole Auto Increment Value Question
I wonder why you selected data from 'b' to verify the success of the insert statements ("SELECT * FROM `b`;"), but did not try the same with 'a' ("SELECT * FROM `a`;").
You probably would notice an empty result set. Nothing has been inserted (it's a black hole or no-operation table, nothing happens on it). Hence there is no insert id.
"SELECT LAST_INSERT_ID();" does not have a table reference. Hence it gives the last insert id created by the current session. And the last insert that happened was that for table 'b'.
Ingo Strüwing, Senior Software Developer - Storage Engines
MySQL AB, www.mysql.com
Subject
Views
Written By
Posted
4140
January 26, 2006 04:37PM
2689
January 27, 2006 03:17AM
3293
January 27, 2006 11:30AM
Re: MyISAM/Blackhole Auto Increment Value Question
2307
January 30, 2006 04:12AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.