From: Mattias Jonsson Date: July 9 2010 12:41pm Subject: bzr commit into mysql-5.1-bugteam branch (mattias.jonsson:3474) List-Archive: http://lists.mysql.com/commits/113248 Message-Id: <201007091242.o69CgFXV015096@rcsinet15.oracle.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6959200943810604860==" --===============6959200943810604860== MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline #At file:///Users/mattiasj/mysql-bzr/topush-51-bugteam/ based on revid:mattias.jonsson@stripped 3474 Mattias Jonsson 2010-07-09 [merge] merge modified: sql/ha_partition.h sql/handler.h === modified file 'sql/ha_partition.h' --- a/sql/ha_partition.h 2010-07-08 23:09:31 +0000 +++ b/sql/ha_partition.h 2010-07-09 12:40:49 +0000 @@ -53,8 +53,7 @@ typedef struct st_ha_data_partition HA_CAN_FULLTEXT | \ HA_DUPLICATE_POS | \ HA_CAN_SQL_HANDLER | \ - HA_CAN_INSERT_DELAYED | \ - HA_PRIMARY_KEY_REQUIRED_FOR_POSITION) + HA_CAN_INSERT_DELAYED) class ha_partition :public handler { private: @@ -775,9 +774,6 @@ public: HA_PRIMARY_KEY_REQUIRED_FOR_POSITION: Does the storage engine need a PK for position? - Used with hidden primary key in InnoDB. - Hidden primary keys cannot be supported by partitioning, since the - partitioning expressions columns must be a part of the primary key. (InnoDB) HA_FILE_BASED is always set for partition handler since we use a === modified file 'sql/handler.h' --- a/sql/handler.h 2010-06-10 20:45:22 +0000 +++ b/sql/handler.h 2010-07-09 12:40:49 +0000 @@ -93,7 +93,10 @@ #define HA_PRIMARY_KEY_IN_READ_INDEX (1 << 15) /* If HA_PRIMARY_KEY_REQUIRED_FOR_POSITION is set, it means that to position() - uses a primary key. Without primary key, we can't call position(). + uses a primary key given by the record argument. + Without primary key, we can't call position(). + If not set, the position is returned as the current rows position + regardless of what argument is given. */ #define HA_PRIMARY_KEY_REQUIRED_FOR_POSITION (1 << 16) #define HA_CAN_RTREEKEYS (1 << 17) @@ -1446,10 +1449,9 @@ public: virtual int rnd_next(uchar *buf)=0; virtual int rnd_pos(uchar * buf, uchar *pos)=0; /** - One has to use this method when to find - random position by record as the plain - position() call doesn't work for some - handlers for random position. + This function only works for handlers having + HA_PRIMARY_KEY_REQUIRED_FOR_POSITION set. + It will return the row with the PK given in the record argument. */ virtual int rnd_pos_by_record(uchar *record) { @@ -1467,6 +1469,12 @@ public: { return HA_ERR_WRONG_COMMAND; } virtual ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key) { return (ha_rows) 10; } + /* + If HA_PRIMARY_KEY_REQUIRED_FOR_POSITION is set, then it sets ref + (reference to the row, aka position, with the primary key given in + the record). + Otherwise it set ref to the current row. + */ virtual void position(const uchar *record)=0; virtual int info(uint)=0; // see my_base.h for full description virtual void get_dynamic_partition_info(PARTITION_INFO *stat_info, --===============6959200943810604860== MIME-Version: 1.0 Content-Type: text/bzr-bundle; charset="us-ascii"; name="bzr/mattias.jonsson@stripped" Content-Transfer-Encoding: 7bit Content-Disposition: inline # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: mattias.jonsson@stripped\ # 5z2j2l51m7lq10c8 # target_branch: file:///Users/mattiasj/mysql-bzr/topush-51-bugteam/ # testament_sha1: b61a3a69b29e72ee3994f6c36f2d63be13810e90 # timestamp: 2010-07-09 14:41:58 +0200 # source_branch: file:///Users/mattiasj/mysql-bzr/b49161-51-bugteam/ # base_revision_id: mattias.jonsson@stripped\ # x6srbt2k8lvy8hu5 # # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWWWRG+4ABQZfgEAQXPf/939/ /qC////wYAnvvC7sNBQVQLZbANAoqtaNOnSEkkU8Enpqn4p5PSGqZqep7VHhT0mnqaAaHqaANqCS Uwpj0pptVM9KHijI0epoD0nqAANGgNNDmmRkMmCGjCYI00aMQNMmRgACDTQSm0p6mnqek0ND1AAA AAAGjQA5pkZDJghowmCNNGjEDTJkYAAgki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