1--echo # now master key is migrated
2--echo # access to this table should pass
3SELECT * FROM T;
4
5let $wl9769_destination_key1 = `SELECT hex(keyring_key_fetch('$key_name1'))`;
6let $wl9769_destination_key2 = `SELECT hex(keyring_key_fetch('$key_name2'))`;
7let $wl9769_destination_key3 = `SELECT hex(keyring_key_fetch('$key_name3'))`;
8
9let $wl9769_destination_key1_type = `SELECT keyring_key_type_fetch('$key_name1')`;
10let $wl9769_destination_key2_type = `SELECT keyring_key_type_fetch('$key_name2')`;
11let $wl9769_destination_key3_type = `SELECT keyring_key_type_fetch('$key_name3')`;
12
13let $wl9769_destination_key1_len = `SELECT keyring_key_length_fetch('$key_name1')`;
14let $wl9769_destination_key2_len = `SELECT keyring_key_length_fetch('$key_name2')`;
15let $wl9769_destination_key3_len = `SELECT keyring_key_length_fetch('$key_name3')`;
16
17--echo check if migration took place correctly
18--replace_result $wl9769_destination_key1 <wl9769_destination_key1> $wl9769_source_key1 <wl9769_source_key1>
19eval SELECT '$wl9769_destination_key1' = '$wl9769_source_key1';
20--replace_result $wl9769_destination_key2 <wl9769_destination_key2> $wl9769_source_key2 <wl9769_source_key2>
21eval SELECT '$wl9769_destination_key2' = '$wl9769_source_key2';
22--replace_result $wl9769_destination_key3 <wl9769_destination_key3> $wl9769_source_key3 <wl9769_source_key3>
23eval SELECT '$wl9769_destination_key3' = '$wl9769_source_key3';
24
25eval SELECT '$wl9769_destination_key1_type' = '$wl9769_source_key1_type';
26eval SELECT '$wl9769_destination_key2_type' = '$wl9769_source_key2_type';
27eval SELECT '$wl9769_destination_key3_type' = '$wl9769_source_key3_type';
28
29eval SELECT '$wl9769_destination_key1_len' = '$wl9769_source_key1_len';
30eval SELECT '$wl9769_destination_key2_len' = '$wl9769_source_key2_len';
31eval SELECT '$wl9769_destination_key3_len' = '$wl9769_source_key3_len';
32
33--replace_regex /[0-9]*-[0-9]*-[0-9]* [0-9]*:[0-9]*:[0-9]*.[0-9]*/key1_timestamp/
34eval SELECT keyring_key_remove('$key_name1');
35--replace_regex /[0-9]*-[0-9]*-[0-9]* [0-9]*:[0-9]*:[0-9]*.[0-9]*/key2_timestamp/
36eval SELECT keyring_key_remove('$key_name2');
37--replace_regex /[0-9]*-[0-9]*-[0-9]* [0-9]*:[0-9]*:[0-9]*.[0-9]*/key3_timestamp/
38eval SELECT keyring_key_remove('$key_name3');
39