Files
MaxScale/maxscale-system-test/mxs2250_describe_temp_table.cpp
Johan Wikman f0c4fd5723 MXS-2250 Add test that reveals the problem
Before the MXS-2250 fix, the following ends with an error:

    CREATE TEMPORARY TABLE t (f INT);
    DESCRIBE t;

Reason is that the first is sent to the master (and the table will
not be replicated to slaves) and the latter to some slave.
2019-06-05 14:29:30 +03:00

32 lines
925 B
C++

/*
* Copyright (c) 2019 MariaDB Corporation Ab
*
* Use of this software is governed by the Business Source License included
* in the LICENSE.TXT file and at www.mariadb.com/bsl11.
*
* Change Date: 2022-01-01
*
* On the date above, in accordance with the Business Source License, use
* of this software will be governed by version 2 or later of the General
* Public License.
*/
#include "mariadb_func.h"
#include "testconnections.h"
int main(int argc, char* argv[])
{
TestConnections test(argc, argv);
Connection rwsplit = test.maxscales->rwsplit();
test.expect(rwsplit.connect(),
"Could not connect to rwsplit.");
test.expect(rwsplit.query("CREATE TEMPORARY TABLE mxs2250 (a int)"),
"Could not create temporary table.");
test.expect(rwsplit.query("DESCRIBE mxs2250"),
"Could not describe temporary table.");
return test.global_result;
}