create table t (a blob(34) null, b mediumint, primary key(b));
alter table t set tiflash replica 1;
alter table t change column b c mediumint;
insert into t values('1', 2);
select * from t;
2020.06.28 12:03:38.459711 [ 23 ] <Error> DB::TiFlashApplyRes DB::HandleWriteRaftCmd(const DB::TiFlashServer*, DB::WriteCmdsView, DB::RaftCmdHeader): Code: 10, e.displayText() = DB::Exception: Not found column b in block. There are only columns: a, c, _INTERNAL_VERSION, _INTERNAL_DELMARK, e.what() = DB::Exception, Stack trace:
0. /data1/jaysonhuang/nodes/28/tiflash/tiflash(StackTrace::StackTrace()+0x1c) [0x128a8fd4]
1. /data1/jaysonhuang/nodes/28/tiflash/tiflash(DB::Exception::Exception(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)+0x4b) [0xce292f7]
2. /data1/jaysonhuang/nodes/28/tiflash/tiflash(DB::Block::getPositionByName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const+0x10a) [0x111078e2]
3. /data1/jaysonhuang/nodes/28/tiflash/tiflash(DB::DM::DeltaMergeStore::write(DB::Context const&, DB::Settings const&, DB::Block const&)+0x226) [0x11f6ae94]
4. /data1/jaysonhuang/nodes/28/tiflash/tiflash(DB::StorageDeltaMerge::write(DB::Block&&, DB::Settings const&)+0x18d) [0x11ebf565]
5. /data1/jaysonhuang/nodes/28/tiflash/tiflash() [0x121c8032]
6. /data1/jaysonhuang/nodes/28/tiflash/tiflash(DB::writeRegionDataToStorage(DB::Context&, std::shared_ptr<DB::Region> const&, std::vector<std::tuple<long, unsigned char, unsigned long, std::shared_ptr<DB::StringObject<false> const> >, std::allocator<std::tuple<long, unsigned char, unsigned long, std::shared_ptr<DB::StringObject<false> const> > > >&, Poco::Logger*)+0xd5) [0x121c857a]
7. /data1/jaysonhuang/nodes/28/tiflash/tiflash(DB::RegionTable::writeBlockByRegion(DB::Context&, std::shared_ptr<DB::Region> const&, std::vector<std::tuple<long, unsigned char, unsigned long, std::shared_ptr<DB::StringObject<false> const> >, std::allocator<std::tuple<long, unsigned char, unsigned long, std::shared_ptr<DB::StringObject<false> const> > > >&, Poco::Logger*, bool)+0x160) [0x121c8fea]
8. /data1/jaysonhuang/nodes/28/tiflash/tiflash(DB::Region::handleWriteRaftCmd(DB::WriteCmdsView const&, unsigned long, unsigned long, DB::TMTContext&)+0x58e) [0x121d930e]
9. /data1/jaysonhuang/nodes/28/tiflash/tiflash(DB::KVStore::handleWriteRaftCmd(DB::WriteCmdsView const&, unsigned long, unsigned long, unsigned long, DB::TMTContext&)+0x1bf) [0x121baf59]
10. /data1/jaysonhuang/nodes/28/tiflash/tiflash(DB::HandleWriteRaftCmd(DB::TiFlashServer const*, DB::WriteCmdsView, DB::RaftCmdHeader)+0x4e) [0x121d2e25]
11. /data1/jaysonhuang/nodes/28/tiflash/libtiflash_proxy.so(+0x11c9543) [0x7f600b76a543]
12. /data1/jaysonhuang/nodes/28/tiflash/libtiflash_proxy.so(+0x11b58d2) [0x7f600b7568d2]
13. /data1/jaysonhuang/nodes/28/tiflash/libtiflash_proxy.so(+0x11b8d24) [0x7f600b759d24]
14. /data1/jaysonhuang/nodes/28/tiflash/libtiflash_proxy.so(+0x350c86) [0x7f600a8f1c86]
15. /data1/jaysonhuang/nodes/28/tiflash/libtiflash_proxy.so(+0x38ba55) [0x7f600a92ca55]
16. /data1/jaysonhuang/nodes/28/tiflash/libtiflash_proxy.so(+0xc714bd) [0x7f600b2124bd]
17. /data1/jaysonhuang/nodes/28/tiflash/libtiflash_proxy.so(+0xc732c7) [0x7f600b2142c7]
18. /usr/lib64/libpthread.so.0(+0x7e64) [0x7f6009428e64]
19. /usr/lib64/libc.so.6(clone+0x6c) [0x7f60089df88c]
ATTACH TABLE t_58
(
a Nullable(String),
c Int32
)
ENGINE = DeltaMerge(b, ... ) <- the pk name(s) in create statement is not changed.