**Describe the bug**
1. execute SQL: `select 1 from a union select 1 from b union all select 1 from c`
2. server panic

**Does it reproduce on recent release?**
* 21.3.1.1
* 21.2.2.8

**Expected behavior**
SQL should error with message: "Expected ALL or DISTINCT in SelectWithUnion query, because setting (union_default_mode) is empty: While processing SELECT 1 FROM a UNION  SELECT 1 FROM b UNION ALL SELECT 1 FROM c"

**Error message and/or stacktrace**

```
2021.02.25 15:18:36.291248 [ 46895 ] {} <Fatal> BaseDaemon: ########################################
2021.02.25 15:18:36.291294 [ 46895 ] {} <Fatal> BaseDaemon: (version 21.2.2.8 (official build), build id: 67D2DA03ADA750F18CEB331C65F50D0F56E33713) (from thread 78379) (no query) Received signal Segmentation fault (11)
2021.02.25 15:18:36.291323 [ 46895 ] {} <Fatal> BaseDaemon: Address: NULL pointer. Access: read. Address not mapped to object.
2021.02.25 15:18:36.291339 [ 46895 ] {} <Fatal> BaseDaemon: Stack trace: 0x11451fff 0x114434a8 0x1148b1bc 0xed45ba5 0xed4408f 0xeb56650 0xeed0c9c 0xeecf7fc 0xf5ca265 0xf5d9ee9 0x11b76baf 0x11b785c1 0x11caf669 0x11cab4ca 0x7f80b67126db 0x7f80b643b71f
2021.02.25 15:18:36.298150 [ 46895 ] {} <Fatal> BaseDaemon: 2. DB::ASTSelectWithUnionQuery::formatQueryImpl(DB::IAST::FormatSettings const&, DB::IAST::FormatState&, DB::IAST::FormatStateStacked) const @ 0x11451fff in /usr/lib/debug/.build-id/67/d2da03ada750f18ceb331c65f50d0f56e33713.debug
2021.02.25 15:18:36.300165 [ 46895 ] {} <Fatal> BaseDaemon: 3. DB::ASTQueryWithOutput::formatImpl(DB::IAST::FormatSettings const&, DB::IAST::FormatState&, DB::IAST::FormatStateStacked) const @ 0x114434a8 in /usr/lib/debug/.build-id/67/d2da03ada750f18ceb331c65f50d0f56e33713.debug
2021.02.25 15:18:36.307065 [ 46895 ] {} <Fatal> BaseDaemon: 4. DB::IAST::formatForErrorMessage() const @ 0x1148b1bc in /usr/lib/debug/.build-id/67/d2da03ada750f18ceb331c65f50d0f56e33713.debug
2021.02.25 15:18:36.311723 [ 46895 ] {} <Fatal> BaseDaemon: 5. DB::InDepthNodeVisitor<DB::OneTypeMatcher<DB::CustomizeASTSelectWithUnionQueryNormalize, &(DB::NeedChild::all(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::IAST> const&)), std::__1::shared_ptr<DB::IAST> >, false, std::__1::shared_ptr<DB::IAST> >::visit(std::__1::shared_ptr<DB::IAST>&) @ 0xed45ba5 in /usr/lib/debug/.build-id/67/d2da03ada750f18ceb331c65f50d0f56e33713.debug
2021.02.25 15:18:36.311758 [ 46895 ] {} <Fatal> BaseDaemon: 6. DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0xed4408f in /usr/lib/debug/.build-id/67/d2da03ada750f18ceb331c65f50d0f56e33713.debug
2021.02.25 15:18:36.311777 [ 46895 ] {} <Fatal> BaseDaemon: 7. DB::InterpreterFactory::get(std::__1::shared_ptr<DB::IAST>&, DB::Context&, DB::SelectQueryOptions const&) @ 0xeb56650 in /usr/lib/debug/.build-id/67/d2da03ada750f18ceb331c65f50d0f56e33713.debug
2021.02.25 15:18:36.314890 [ 46895 ] {} <Fatal> BaseDaemon: 8. DB::executeQueryImpl(char const*, char const*, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool, DB::ReadBuffer*) @ 0xeed0c9c in /usr/lib/debug/.build-id/67/d2da03ada750f18ceb331c65f50d0f56e33713.debug
2021.02.25 15:18:36.327946 [ 46895 ] {} <Fatal> BaseDaemon: 9. DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool) @ 0xeecf7fc in /usr/lib/debug/.build-id/67/d2da03ada750f18ceb331c65f50d0f56e33713.debug
2021.02.25 15:18:36.330944 [ 46895 ] {} <Fatal> BaseDaemon: 10. DB::TCPHandler::runImpl() @ 0xf5ca265 in /usr/lib/debug/.build-id/67/d2da03ada750f18ceb331c65f50d0f56e33713.debug
2021.02.25 15:18:36.333015 [ 46895 ] {} <Fatal> BaseDaemon: 11. DB::TCPHandler::run() @ 0xf5d9ee9 in /usr/lib/debug/.build-id/67/d2da03ada750f18ceb331c65f50d0f56e33713.debug
2021.02.25 15:18:36.342141 [ 46895 ] {} <Fatal> BaseDaemon: 12. Poco::Net::TCPServerConnection::start() @ 0x11b76baf in /usr/lib/debug/.build-id/67/d2da03ada750f18ceb331c65f50d0f56e33713.debug
2021.02.25 15:18:36.342165 [ 46895 ] {} <Fatal> BaseDaemon: 13. Poco::Net::TCPServerDispatcher::run() @ 0x11b785c1 in /usr/lib/debug/.build-id/67/d2da03ada750f18ceb331c65f50d0f56e33713.debug
2021.02.25 15:18:36.342447 [ 46895 ] {} <Fatal> BaseDaemon: 14. Poco::PooledThread::run() @ 0x11caf669 in /usr/lib/debug/.build-id/67/d2da03ada750f18ceb331c65f50d0f56e33713.debug
2021.02.25 15:18:36.342672 [ 46895 ] {} <Fatal> BaseDaemon: 15. Poco::ThreadImpl::runnableEntry(void*) @ 0x11cab4ca in /usr/lib/debug/.build-id/67/d2da03ada750f18ceb331c65f50d0f56e33713.debug
2021.02.25 15:18:36.342689 [ 46895 ] {} <Fatal> BaseDaemon: 16. start_thread @ 0x76db in /lib/x86_64-linux-gnu/libpthread-2.27.so
2021.02.25 15:18:36.342785 [ 46895 ] {} <Fatal> BaseDaemon: 17. /build/glibc-S9d2JN/glibc-2.27/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:97: __GI___clone @ 0x12171f in /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.27.so
2021.02.25 15:18:36.433212 [ 46895 ] {} <Fatal> BaseDaemon: Checksum of the binary: 3B52BD94C585A17D2C45E5ABAABC8124, integrity check passed.
2021.02.25 15:20:09.800886 [ 78267 ] {} <Fatal> Application: Child process was terminated by signal 11.
```
all_nested_ignore_quota = false;
    }
    options.ignore_limits |= all_nested_ignore_limits;
    options.ignore_quota |= all_nested_ignore_quota;
}
Block InterpreterSelectWithUnionQuery::getCommonHeaderForUnion(const Blocks & headers)
{
    size_t num_selects = headers.size();
    Block common_header = headers.front();
    size_t num_columns = common_header.columns();
    for (size_t query_num = 1; query_num < num_selects; ++query_num)
    {
        if (headers[query_num].columns() != num_columns)
            throw Exception("Different number of columns in UNION ALL elements:\n"
                            + common_header.dumpNames()
                            + "\nand\n"
                            + headers[query_num].dumpNames() + "\n",
                            ErrorCodes::UNION_ALL_RESULT_STRUCTURES_MISMATCH);
    }
    std::vector<const ColumnWithTypeAndName *> columns(num_selects);
    for (size_t column_num = 0; column_num < num_columns; ++column_num)
    {
        for (size_t i = 0; i < num_selects; ++i)
            columns[i] = &headers[i].getByPosition(column_num);
        ColumnWithTypeAndName & result_elem = common_header.getByPosition(column_num);
        result_elem = getLeastSuperColumn(columns);
    }
    return common_header;
}
Block InterpreterSelectWithUnionQuery::getCurrentChildResultHeader(const ASTPtr & ast_ptr_, const Names & required_result_column_names)