i use
my steps
1. create a new database ckdb on mysql, then  create table t1(a int, primary key(a)); and insert some rows
2. SET allow_experimental_database_materialize_mysql=1; at clickhouse, 
3. CREATE DATABASE ckdb ENGINE = MaterializeMySQL('127.0.0.1:3306', 'ckdb', 'root', 'A123b_456');
4. use ckdb and select * from t1 ok
5. create table dzm as select * from others in mysql ----> cannot see dzm in clickhouse, but if select * from t1, reports
```
Code: 48. DB::Exception: Received from localhost:9000. DB::Exception: The ckdb.dzm cannot be materialized, because there is no primary keys..
```
6. create table t2(a int,b int primary a);----> cannot see t2 in clickhouse, , but if select * from t1, reports
```
Code: 44. DB::Exception: Received from localhost:9000. DB::Exception: Sorting key cannot contain nullable columns.
```
<del>7. if i drop ckdb and recreate it, all tables can be selected </del>
7.if there are some 'bad' tables in a database, all tables in that database cannot be selected

Make sure to check documentation https://clickhouse.yandex/docs/en/ first. If the question is concise and probably has a short answer, asking it in Telegram chat https://telegram.me/clickhouse_en is probably the fastest way to find the answer. For more complicated questions, consider asking them on StackOverflow with "clickhouse" tag https://stackoverflow.com/questions/tagged/clickhouse 

If you still prefer GitHub issues, remove all this text and ask your question here.

"CREATE TABLE test_database.test_table_1 (`key` Nullable(" + mapped_type + "), `_sign` Int8() MATERIALIZED 1, "
            "`_version` UInt64() MATERIALIZED 1) ENGINE = ReplacingMergeTree(_version)" + replace_string(partition_policy, "key", "assumeNotNull(key)") + " ORDER BY tuple(key)");
        EXPECT_EQ(queryToString(tryRewrittenCreateQuery(
            "CREATE TABLE `test_database`.`test_table_1` (`key` " + test_type + " NOT NULL PRIMARY KEY)", context_holder.context)),
            "CREATE TABLE test_database.test_table_1 (`key` " + mapped_type + ", `_sign` Int8() MATERIALIZED 1, "
            "`_version` UInt64() MATERIALIZED 1) ENGINE = ReplacingMergeTree(_version)" + partition_policy + " ORDER BY tuple(key)");
    }
}
TEST(MySQLCreateRewritten, RewrittenQueryWithPrimaryKey)
{
    tryRegisterFunctions();
    const auto & context_holder = getContext();
    EXPECT_EQ(queryToString(tryRewrittenCreateQuery(
        "CREATE TABLE `test_database`.`test_table_1` (`key` int NOT NULL PRIMARY KEY) ENGINE=InnoDB DEFAULT CHARSET=utf8", context_holder.context)),
        "CREATE TABLE test_database.test_table_1 (`key` Int32, `_sign` Int8() MATERIALIZED 1, `_version` UInt64() MATERIALIZED 1) ENGINE = ReplacingMergeTree(_version) "
        "PARTITION BY intDiv(key, 4294967) ORDER BY tuple(key)");
    EXPECT_EQ(queryToString(tryRewrittenCreateQuery(
        "CREATE TABLE `test_database`.`test_table_1` (`key` int NOT NULL, PRIMARY KEY (`key`)) ENGINE=InnoDB DEFAULT CHARSET=utf8", context_holder.context)),
        "CREATE TABLE test_database.test_table_1 (`key` Int32, `_sign` Int8() MATERIALIZED 1, `_version` UInt64() MATERIALIZED 1) ENGINE = ReplacingMergeTree(_version) "
        "PARTITION BY intDiv(key, 4294967) ORDER BY tuple(key)");
    EXPECT_EQ(queryToString(tryRewrittenCreateQuery(
        "CREATE TABLE `test_database`.`test_table_1` (`key_1` int NOT NULL, key_2 INT NOT NULL, PRIMARY KEY (`key_1`, `key_2`)) ENGINE=InnoDB DEFAULT CHARSET=utf8", context_holder.context)),
        "CREATE TABLE test_database.test_table_1 (`key_1` Int32, `key_2` Int32, `_sign` Int8() MATERIALIZED 1, `_version` UInt64() MATERIALIZED 1) ENGINE = "
        "ReplacingMergeTree(_version) PARTITION BY intDiv(key_1, 4294967) ORDER BY (key_1, key_2)");
    EXPECT_EQ(queryToString(tryRewrittenCreateQuery(
        "CREATE TABLE `test_database`.`test_table_1` (`key_1` BIGINT NOT NULL, key_2 INT NOT NULL, PRIMARY KEY (`key_1`, `key_2`)) ENGINE=InnoDB DEFAULT CHARSET=utf8", context_holder.context)),
        "CREATE TABLE test_database.test_table_1 (`key_1` Int64, `key_2` Int32, `_sign` Int8() MATERIALIZED 1, `_version` UInt64() MATERIALIZED 1) ENGINE = "
        "ReplacingMergeTree(_version) PARTITION BY intDiv(key_2, 4294967) ORDER BY (key_1, key_2)");
}