Hi Brian!

Here's a diff for a tentative definition of indexes for a table.

If you have no objections, I'll update the wiki...

/Matz

Brian Aker wrote:
> Hi!
> 
> My roadblock in getting I_S, FRM, etc done is coming up with a new
> serialized form of a table definition. I've found that I really like
> what Google has done with Protobuffers.
> 
> This is the definition I have thus far:
> http://drizzle.wikia.com/wiki/Table_Proto_Definition#Current_Definition
> 
> Foreign Keys have not been defined yet, and the index definition is
> weak. I've put it up on Wikia so that others can take a look at it/offer
> up edits. Right now I have defined out all of the types, but it would be
> possible to shrink these (aka put a bit in for signed/unsigned... use
> collation to define binary or not).
> 
> Thoughts? Suggestions? Additions from engine folks?

[EMAIL PROTECTED]:~/lang/proto/tests$ diff -u table.proto.orig table.proto
--- table.proto.orig    2008-08-12 13:47:07.965551968 +0200
+++ table.proto 2008-08-12 13:46:27.649580687 +0200
@@ -37,8 +37,20 @@
     optional string custom_name = 10;
   }

+  enum IndexType {
+    UNDEFINED = 0;
+    UNIQUE = 1;
+    PRIMARY = 2;
+  }
+
+  message Index {
+    repeated string name = 1;
+    optional IndexType type = 2 [default = UNDEFINED];
+    optional int32 key_block_size = 3;
+  }
+
   repeated Field field = 4;
-  optional string primary = 5;
+  repeated Index index = 5;
   optional int32  auto_increment = 6;
   optional int32 avg_row_length = 7;
   optional string character_set = 8;
@@ -49,7 +61,6 @@
   optional string data_directory = 13;
   optional string index_directory = 14;
   optional bool delay_key_write = 15;
-  optional int32 key_block_size = 16;
   optional int32 max_rows = 17;
   optional int32 min_rows = 18;
   optional bool pack_keys = 19;

> 
> Cheers,
>     -Brian
> 
> -- 
> _______________________________________________________
> Brian "Krow" Aker, brian at tangent.org
> Seattle, Washington
> http://krow.net/                     <-- Me
> http://tangent.org/                <-- Software
> _______________________________________________________
> You can't grep a dead tree.
> 
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~drizzle-discuss
> Post to     : [email protected]
> Unsubscribe : https://launchpad.net/~drizzle-discuss
> More help   : https://help.launchpad.net/ListHelp


-- 
Mats Kindahl
Lead Software Developer
Replication Team
MySQL AB, www.mysql.com
begin:vcard
fn:Mats Kindahl
n:Kindahl;Mats
org:Sun Microsystems
adr;quoted-printable:;;Tegv=C3=A4gen 3;Storvreta;SE;74334;Sweden
email;internet:[EMAIL PROTECTED]
title:Lead Replication Software Developer
x-mozilla-html:FALSE
version:2.1
end:vcard

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to