List:Internals« Previous MessageNext Message »
From:Paul McCullagh Date:April 21 2007 11:37am
Subject:Re: How to create hidden Field in Storage Engine?
View as plain text  
Hi Xiao,

Why not just insist that the table be created with a column with a  
specific name, like "row#". The table definition would also have to  
include a unique index definition on this column.

Your engine can then handle this column internally as the rowid  
column. So the engine would generate an error if the column is  
inserted or updated (or just ignore such operations), and handle  
index access on this column as a special case.

With this method the rowID column would not be hidden, but does it  
really have to be?

Best regards,

Paul


On Apr 21, 2007, at 11:42 AM, xiao feng wrote:

> Hi,
>     I have a db engine, I have use it as an mysql Storage Engine.
>     I wan to auto create some hidden fields in table, such as  
> Oracle's rownum/rowid, it can be used for query data, but not in  
> tables "desc”。
>     So  I think storage should have a vritual function like  
> prepare_create ,  allow user can add their own hidden fields before  
> create table.
>     Thanks!
>
> ----- Original Message -----
> From: <peter@stripped>
> To: "xiao feng" <cnstar9988@stripped>
> Cc: <peter@stripped>; "Sergei Golubchik" <serg@stripped>;  
> "MySQL Internal" <internals@stripped>
> Sent: Wednesday, April 11, 2007 3:07 PM
> Subject: Re: How to create hidden Field in Storage Engine?
>
>
>> Hi Xiao,
>>
>>>    I think storage should have a vritual function like  
>>> prepare_create ,
>>> allow user can add their own hidden fields before create table.
>>
>> if you could explain a bit more in detail what you trying to  
>> implement it
>> would be better to understand why you need it. Also what type of  
>> storage
>> engine are you trying to implement?
>>
>> Cheers,
>> Peter
>>
>
> --
> MySQL Internals Mailing List
> For list archives: http://lists.mysql.com/internals
> To unsubscribe:    http://lists.mysql.com/internals? 
> unsub=paul.mccullagh@stripped
>

Thread
How to Create Session Variable in my storage engine?xiao feng9 Apr
  • Re: How to Create Session Variable in my storage engine?Sergei Golubchik9 Apr
    • Re: How to Create Session Variable in my storage engine?peter9 Apr
      • Re: How to Create Session Variable in my storage engine?Sergei Golubchik21 May
        • Re: How to Create Session Variable in my storage engine?Peter B. Volk21 May
  • How to create hidden Field in Storage Engine?xiao feng9 Apr
    • Re: How to create hidden Field in Storage Engine?peter9 Apr
  • Re: How to create hidden Field in Storage Engine?xiao feng11 Apr
    • Re: How to create hidden Field in Storage Engine?peter11 Apr
  • Re: How to create hidden Field in Storage Engine?xiao feng21 Apr
    • Re: How to create hidden Field in Storage Engine?Paul McCullagh21 Apr
    • Re: How to create hidden Field in Storage Engine?Brian Aker21 Apr
  • Re: How to create hidden Field in Storage Engine?xiao feng21 Apr
    • Re: How to create hidden Field in Storage Engine?Paul McCullagh21 Apr
  • Re: How to create hidden Field in Storage Engine?xiao feng21 Apr
  • Re: How to create hidden Field in Storage Engine?xiao feng22 Apr