Michael Widenius <mo...@askmonty.org> writes:

> knielsen> === modified file 'mysql-test/r/innodb.result'
> knielsen> --- a/mysql-test/r/innodb.result    2009-06-09 15:08:46 +0000
> knielsen> +++ b/mysql-test/r/innodb.result    2009-06-18 12:39:21 +0000
> knielsen> @@ -1970,7 +1970,7 @@ explain select count(*) from t1 where v 
> knielsen>  id select_type     table   type    possible_keys   key     key_len 
> ref     rows    Extra
> knielsen>  1  SIMPLE  t1      ref     v       v       13      const   #       
> Using where; Using index
> knielsen>  alter table t1 add unique(v);
> knielsen> -ERROR 23000: Duplicate entry 'v' for key 'v_2'
> knielsen> +ERROR 23000: Duplicate entry '{ ' for key 'v_2'
> knielsen>  alter table t1 add key(v);
> knielsen>  select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a';
> knielsen>  qq
>
> Strange change in test result, but can't comment on it as I don't know
> the test.

> Ok to push, but please check that the duplicate key error is correct
> (ie, there is two keys with the content '{ ')

Actually, this key value is just an arbitrary placeholder, due to this in
include/varchar.inc:

+# Which duplicate entry triggers error is not deterministic.
+--replace_regex /Duplicate entry '[^']+' for key/Duplicate entry '{ ' for key/

The reason I replace with that value is that this is the value detected as
duplicate in some other tests (I think it was a maria test). So replacing with
this value was to avoid having to change more result files.

However, this is perhaps somewhat confusing, so if you prefer I could instead
do something like this:

+# Which duplicate entry triggers error is not deterministic.
+--replace_regex /Duplicate entry '[^']+' for key/Duplicate entry 'DUP' for key/

and update all result files accordingly.

In any case, there are multiple duplicates in the statement, so doesn't really
make sense to check which one is mentioned in the error message.

> knielsen> === modified file 'storage/xtradb/handler/ha_innodb.cc'
>
> <cut>
>
> knielsen> @@ -6900,7 +6901,7 @@ ha_innobase::records_in_range(
> knielsen>                                                   mode2);
> knielsen>     } else {
>  
> knielsen> -           n_rows = 0;
> knielsen> +           n_rows = HA_POS_ERROR;
> knielsen>     }
>  
> Looks correct. Wonder from where the n_rows= 0 came from...

I do not know. This and a few other minor innodb changes are just merges from
the MySQL tree.

I checked all of the changes in storage/innodb in MySQL. Most of them were
already in storage/xtradb; the ones that were not I applied manually.

 - Kristian.

_______________________________________________
Mailing list: https://launchpad.net/~maria-developers
Post to     : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to