Code review comment for lp:~laurynas-biveinis/percona-server/ahi-partitions-5.6-5.6

Revision history for this message
Alexey Kopytov (akopytov) wrote :

On Tue, Aug 27 2013 15:52:14 +0000, Laurynas Biveinis wrote:

>> More comments on test cases:
> ...
>> I don’t know the purpose of all these checks which are replicated from
>> one test case to another. It looks like some incompetent (to put it
>> mildly) person first wrote them, and then everyone else copies that
>> stuff whenever he needs to implement a variable test.
>>
>> What I would expect to see in a sys_var.*_basic test is verifying
>> the variable type, and default/min/max values. Instead most tests do
>> some acrobatics with I_S and different syntax to access the variable.
>
> I absolutely agree with all these comments and obviously I have cut some corners when copied/pasted/modified it.
>
> What do you think about the following? The variable is global-only, read-only. Check the default, check the read-only-ness, check that global only. For 5.5 too.
>
> # A sys_vars suite test from innodb_adaptive_hash_index_partitions.
>
> --source include/have_innodb.inc
>
> SELECT @@GLOBAL.innodb_adaptive_hash_index_partitions;
>
> --error ER_INCORRECT_GLOBAL_LOCAL_VAR
> SET @@GLOBAL.innodb_adaptive_hash_index_partitions=1;
>
> --error ER_INCORRECT_GLOBAL_LOCAL_VAR
> SELECT @@LOCAL.innodb_adaptive_hash_index_partitions;
>
> --error ER_INCORRECT_GLOBAL_LOCAL_VAR
> SELECT @@SESSION.innodb_adaptive_hash_index_partitions;

OK.

« Back to merge proposal