Re: [Maria-developers] e2f8f968785: MDEV-18790 Server crash in fields_in_hash_keyinfo after unsuccessful...
Hi, Sachin! Ok to push, just one minor detail, see below On Mar 12, Sachin Setiya wrote:
revision-id: e2f8f968785 (mariadb-10.4.3-57-ge2f8f968785) parent(s): 6d68a3464e9 author: sachin <sachin.setiya@mariadb.com> committer: sachin <sachin.setiya@mariadb.com> timestamp: 2019-03-12 19:29:57 +0530 message:
MDEV-18790 Server crash in fields_in_hash_keyinfo after unsuccessful... attempt to drop BLOB with long index
Restore long table->key_info, So that in the case of unsuccessful table alter table->key_info should have a correct value. In the case of successful table alter old table is flushed so that is why we don't see this error in the case of successful alter.
diff --git a/mysql-test/main/long_unique_bugs.result b/mysql-test/main/long_unique_bugs.result index 5de7566c8a3..1544565d95e 100644 --- a/mysql-test/main/long_unique_bugs.result +++ b/mysql-test/main/long_unique_bugs.result @@ -57,3 +57,9 @@ create table t (b blob, unique(b)) engine=myisam; insert into t values ('foo'); replace into t values ('foo'); drop table t; +CREATE TABLE t1 (f INT, x BLOB, UNIQUE (x)); +INSERT INTO t1 VALUES (1,'foo'); +ALTER TABLE t1 DROP x, ALGORITHM=INPLACE; +Got one of the listed errors +UPDATE t1 SET x = 'bar'; +DROP TABLE t1; diff --git a/mysql-test/main/long_unique_bugs.test b/mysql-test/main/long_unique_bugs.test index 0246ea7962a..14c002f998c 100644 --- a/mysql-test/main/long_unique_bugs.test +++ b/mysql-test/main/long_unique_bugs.test @@ -72,3 +72,13 @@ create table t (b blob, unique(b)) engine=myisam; insert into t values ('foo'); replace into t values ('foo'); drop table t; + +# +# MDEV-18790 Server crash in fields_in_hash_keyinfo after unsuccessful attempt to drop BLOB with long index +# +CREATE TABLE t1 (f INT, x BLOB, UNIQUE (x)); +INSERT INTO t1 VALUES (1,'foo'); +--error ER_ALTER_OPERATION_NOT_SUPPORTED,ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
this makes the test to accept any of the listed error messages and the result file will have "Got one of the listed errors". It's useful when a test can indeed see different errors in a certain place (Elena has probably run the test with different storage engines, and has seen different errors for MyISAM and InnoDB). But this final committed test case is very deterministic, and as far as I can see there can be only one possible error code here. It's generally better to have just this one error code in the `--error` directive and the correct complete error message text in the result file.
+ALTER TABLE t1 DROP x, ALGORITHM=INPLACE; +UPDATE t1 SET x = 'bar'; +DROP TABLE t1;
Regards, Sergei Chief Architect MariaDB and security@mariadb.org
participants (1)
-
Sergei Golubchik