Debian Codegraph @

mysql-test/suite/ndb_ddl/identifier_limits63_debug.test

raw
1 --source include/have_ndb.inc
2 --source include/have_debug.inc
3
4 # ############################################################
5 # WL#10162 Schema dist operation error code return
6 # - fixes problem with too short columns for db and table
7 # name in the ndb_schema table. When using long identifiers
8 # with multibyte characters there wasn't enough room
9 # for them to be distributed.
10 # - when upgrading the cluster without modifying the ndb_schema
11 # table this limit will still be in effect, this test
12 # ensures that limit is properly enforced in such case
13 # ############################################################
14 set @save_debug = @@global.debug;
15
16 --echo # Testing schema identifier with length 64
17 --echo # NOTE! ndb_schema identifier length limit used to be 63 bytes,
18 --echo # use dbug keyword to emulate old limit
19 --echo #
20 set global debug='+d,ndb_schema_dist_63byte_limit';
21
22 let $name64 = abcdefghijklmnopqrstuvwxyz1234567890bcdefghijklmnopqrstuvwxyz123;
23 --disable_query_log ONCE
24 eval SELECT LENGTH('$name64') as should_be_64_bytes,
25 CHAR_LENGTH('$name64') as should_be_64_characters;
26
27 # Suppress error log messages triggered by failure to distribute in
28 # the below tests
29 -- disable_query_log ONCE
30 call mtr.add_suppression("Failed to distribute");
31
32 --echo # Create database suceeds but generates a warning as well as
33 --echo # prints a message to log.
34 eval CREATE DATABASE $name64;
35 --echo # Verify database existence
36 eval USE $name64;
37 --echo # Create non NDB table
38 CREATE TABLE t1 (
39 a int
40 );
41 --echo # Create NDB table should fail
42 --error ER_TOO_LONG_IDENT
43 CREATE TABLE t2 (
44 a int
45 ) ENGINE=NDB;
46 show warnings;
47
48 eval DROP DATABASE $name64;
49
50 set @@global.debug = @save_debug;