**Use case**
Some program left garbage in terminal.

**Describe the solution you'd like**
Subset of what `reset` command does.
full_query = text_;
        /// Some parts of a query (result output and formatting) are executed
        /// client-side. Thus we need to parse the query.
        c begin = full_query.data();
        parsed_query = parseQuery(begin, begin + full_query.size(), false);
        if (!parsed_query)
            return;
        // An INSERT query may have the data that follow query text. Remove the
        /// Send part of query without data, because data will be sent separately.
        auto * insert = parsed_query->as<ASTInsertQuery>();
        if (insert && insert->data)
        
            query_to_send = full_query.substr(0, insert->data - full_query.data());
        }
        else
        
            query_to_send = full_query;
        }
        processParsedSingleQuery();
        if (have_error)
        
            reportQueryError();
        }
    }
    // Parameters are in global variables:
    /
    // 'at is sent to server,
    // 'full_query' -- for INSERT queries, contains the query and the data that
    // follow it. Its memory is referenced by ASTInsertQuery::begin, end.