Skip to content

Commit 333b153

Browse files
committed
Merge '7.4' into mysql-trunk-cluster
- fix conflicts in copyright headers - replace Sql_condition::WARN_LEVEL_WARN with Sql_condition::SL_WARNING - replace usage of pthread_ with native_ - Add SHOW_SCOPE_GLOBAL to new(or refactored) status variables Conflicts: .gitignore VERSION mysql-test/collections/default.experimental mysql-test/suite/ndb/r/ndb_alter_table_online.result mysql-test/suite/ndb/r/ndb_alter_table_online2.result mysql-test/suite/ndb/r/ndb_types.result mysql-test/suite/ndb/t/ndb_types.test mysql-test/suite/ndb_binlog/r/ndb_binlog_ddl_multi.result mysql-test/suite/ndb_binlog/r/ndb_binlog_discover_multi.result mysql-test/suite/ndb_binlog/r/ndb_binlog_log_bin.result mysql-test/suite/ndb_binlog/t/ndb_binlog_discover.test mysql-test/suite/ndb_rpl/r/ndb_rpl_conflict_epoch.result mysql-test/suite/ndb_rpl/r/ndb_rpl_conflict_epoch_ext.result mysql-test/suite/ndb_rpl/r/ndb_rpl_conflict_epoch_trans.result mysql-test/suite/ndb_rpl/r/ndb_rpl_conflict_epoch_trans_ext.result mysql-test/suite/ndb_rpl/t/ndb_conflict_info.inc mysql-test/suite/ndb_rpl/t/ndb_rpl_conflict_epoch.inc mysql-test/suite/ndb_rpl/t/ndb_rpl_conflict_epoch_trans.inc mysql-test/suite/ndb_rpl/t/ndb_trans_conflict_info.inc mysql-test/suite/ndb_rpl/t/ndb_trans_conflict_info_stable.inc mysql-test/suite/rpl/r/rpl_4threads_deadlock.result mysql-test/suite/rpl/t/rpl_4threads_deadlock.test packaging/rpm-oel/mysql.spec.in scripts/mysql_system_tables.sql sql/ha_ndb_ddl_fk.cc sql/ha_ndbcluster.cc sql/ha_ndbcluster_binlog.cc sql/ha_ndbcluster_binlog.h sql/sql_show.h storage/ndb/CMakeLists.txt storage/ndb/clusterj/clusterj-core/src/main/java/com/mysql/clusterj/core/SessionFactoryImpl.java storage/ndb/include/kernel/GlobalSignalNumbers.h storage/ndb/include/kernel/ndb_limits.h storage/ndb/include/mgmapi/mgmapi_config_parameters.h storage/ndb/include/ndbapi/NdbDictionary.hpp storage/ndb/include/transporter/TransporterCallback.hpp storage/ndb/include/transporter/TransporterRegistry.hpp storage/ndb/src/common/debugger/signaldata/CMakeLists.txt storage/ndb/src/common/debugger/signaldata/PackedSignal.cpp storage/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp storage/ndb/src/common/debugger/signaldata/SignalNames.cpp storage/ndb/src/common/portlib/NdbCondition.c storage/ndb/src/common/transporter/TransporterRegistry.cpp storage/ndb/src/kernel/blocks/ERROR_codes.txt storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp storage/ndb/src/kernel/blocks/dbspj/Dbspj.hpp storage/ndb/src/kernel/blocks/lgman.cpp storage/ndb/src/kernel/blocks/tsman.cpp storage/ndb/src/kernel/error/ErrorReporter.cpp storage/ndb/src/kernel/vm/DLHashTable.hpp storage/ndb/src/kernel/vm/mt.cpp storage/ndb/src/mgmsrv/MgmtSrvr.hpp storage/ndb/src/mgmsrv/Services.cpp storage/ndb/src/ndbapi/ClusterMgr.cpp storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp storage/ndb/src/ndbapi/NdbScanOperation.cpp storage/ndb/src/ndbapi/TransporterFacade.hpp storage/ndb/src/ndbapi/WakeupHandler.cpp storage/ndb/src/ndbapi/trp_buffer.hpp storage/ndb/src/ndbapi/trp_client.hpp storage/ndb/test/ndbapi/testBasic.cpp storage/ndb/test/ndbapi/testIndex.cpp storage/ndb/test/ndbapi/testLimits.cpp storage/ndb/test/ndbapi/testNdbApi.cpp storage/ndb/test/src/HugoTransactions.cpp storage/ndb/tools/ndb_dist_priv.sql support-files/mysql.spec.sh
2 parents 952ccc3 + 9766697 commit 333b153

File tree

587 files changed

+51981
-14663
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

587 files changed

+51981
-14663
lines changed

.gitignore

+1-6
Original file line numberDiff line numberDiff line change
@@ -3045,8 +3045,7 @@ storage/ndb/**/target
30453045
storage/ndb/**/*.class
30463046
storage/ndb/src/ndbjtie/**/*.sh
30473047
storage/ndb/src/ndbjtie/**/*.log
3048-
storage/ndb/src/ndbjtie/**/*.cmd
3049-
storage/ndb/src/ndbjtie/**/*_test
3048+
storage/ndb/src/ndbjtie/jtie/test/myapi/myapi_test
30503049
storage/ndb/clusterj/**/*MANIFEST.MF
30513050
storage/ndb/clusterj/**/*manifest.mf
30523051
storage/ndb/test/crund/*.cnf
@@ -3129,10 +3128,6 @@ Docs/INFO_SRC
31293128
Testing
31303129
FilesCopied
31313130
source_downloads
3132-
storage/ndb/include/ndb_config.h
3133-
storage/ndb/memcache/memcached_path.pl
3134-
storage/ndb/memcache/sandbo*
3135-
storage/ndb/memcache/include/ndbmemcache_config.h
31363131
client/mysql_plugin
31373132
support-files/plugins.files
31383133
storage/perfschema/pfs_lex_token.h

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
MYSQL_VERSION_MAJOR=5
22
MYSQL_VERSION_MINOR=7
33
MYSQL_VERSION_PATCH=6
4-
MYSQL_VERSION_EXTRA=-ndb-7.4.0
4+
MYSQL_VERSION_EXTRA=-ndb-7.4.5

mysql-test/collections/default.experimental

+5
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,8 @@ rpl.rpl_gtid_stress_failover # Bug#16409537 2014-09-18 Shiv Fails of
2222

2323
interactive_utilities.mysql_secure_installation #Bug19077239 2014-09-18 Sneha Fails often on daily trunk branches
2424
interactive_utilities.mysql_secure_installation_ssl #Bug19077239 2014-09-18 Sneha Fails often on daily trunk branches
25+
26+
# Bug #20402364 NDB : NDB_ADDNODE_WITHBINLOG FAILS DUE TO EVENT API STALL
27+
# FC : SUMA bug related to CREATE NODEGROUP/DROP NODEGROUP/CREATE NODEGROUP
28+
ndb.ndb_addnode_withbinlog
29+

mysql-test/include/default_ndbd.cnf

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ BackupLogBufferSize= 2M
2424
BackupMemory= 4M
2525
TwoPassInitialNodeRestartCopy=1
2626
TransactionDeadlockDetectionTimeout=3000
27+
Checksum=1
2728

2829
# O_DIRECT has issues on 2.4 which have not been handled, Bug #29612
2930
#ODirect= 1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
--perl
2+
use strict;
3+
use lib "lib/";
4+
use My::Find;
5+
use File::Basename;
6+
7+
my $mysql_test_dir = $ENV{MYSQL_TEST_DIR} or die "Need MYSQL_TEST_DIR";
8+
my $basedir = dirname($mysql_test_dir);
9+
10+
# In the RPM case, binaries and libraries are installed in the
11+
# default system locations, instead of having our own private base
12+
# directory. And we install "usr/share/mysql-test". Moving up two
13+
# more directory relative to "mysql-test" gives us a usable base
14+
# directory for RPM installs.
15+
if (! -d "$basedir/sql" and ! -d "$basedir/bin" )
16+
{
17+
$basedir= dirname($basedir);
18+
}
19+
my $bindir = $ENV{MTR_BINDIR} || $basedir; # Out of source set MTR_BINDIR
20+
21+
my $NDB_INDEX_STAT = my_find_bin($bindir,
22+
["storage/ndb/tools", "bin"],
23+
"ndb_index_stat");
24+
25+
my $vardir = $ENV{MYSQLTEST_VARDIR} or die "Need MYSQLTEST_VARDIR" ;
26+
open ( OUTPUT, ">$vardir/tmp/ndb_find_index_stat_tool_result.inc") ;
27+
print OUTPUT "let \$NDB_INDEX_STAT=$NDB_INDEX_STAT;\n";
28+
close (OUTPUT);
29+
EOF
30+
31+
--source $MYSQLTEST_VARDIR/tmp/ndb_find_index_stat_tool_result.inc
32+
--remove_file $MYSQLTEST_VARDIR/tmp/ndb_find_index_stat_tool_result.inc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
--perl
2+
use strict;
3+
use lib "lib/";
4+
use My::Find;
5+
use File::Basename;
6+
7+
my $mysql_test_dir = $ENV{MYSQL_TEST_DIR} or die "Need MYSQL_TEST_DIR";
8+
my $basedir = dirname($mysql_test_dir);
9+
10+
# In the RPM case, binaries and libraries are installed in the
11+
# default system locations, instead of having our own private base
12+
# directory. And we install "usr/share/mysql-test". Moving up two
13+
# more directory relative to "mysql-test" gives us a usable base
14+
# directory for RPM installs.
15+
if (! -d "$basedir/sql" and ! -d "$basedir/bin" )
16+
{
17+
$basedir= dirname($basedir);
18+
}
19+
my $bindir = $ENV{MTR_BINDIR} || $basedir; # Out of source set MTR_BINDIR
20+
21+
my $NDB_PRINT_FILE = my_find_bin($bindir,
22+
["storage/ndb/src/kernel/blocks", "bin"],
23+
"ndb_print_file");
24+
25+
my $vardir = $ENV{MYSQLTEST_VARDIR} or die "Need MYSQLTEST_VARDIR" ;
26+
open ( OUTPUT, ">$vardir/tmp/ndb_find_print_file_tool_result.inc") ;
27+
print OUTPUT "let \$NDB_PRINT_FILE=$NDB_PRINT_FILE;\n";
28+
close (OUTPUT);
29+
EOF
30+
31+
--source $MYSQLTEST_VARDIR/tmp/ndb_find_print_file_tool_result.inc
32+
--remove_file $MYSQLTEST_VARDIR/tmp/ndb_find_print_file_tool_result.inc

mysql-test/suite/ndb/r/ndb_alter_table.result

+33
Original file line numberDiff line numberDiff line change
@@ -546,4 +546,37 @@ DROP TABLESPACE ts1
546546
ENGINE ndb;
547547
DROP LOGFILE GROUP lg1
548548
ENGINE = ndb;
549+
#test alter table add column with partion by and comment clause
550+
CREATE TABLE t1(id INT, PRIMARY KEY(id)) ENGINE=NDB;
551+
ALTER TABLE t1 ADD value INT NULL, COMMENT='comment1' PARTITION BY KEY(id);
552+
SHOW CREATE TABLE t1;
553+
Table Create Table
554+
t1 CREATE TABLE `t1` (
555+
`id` int(11) NOT NULL DEFAULT '0',
556+
`value` int(11) DEFAULT NULL,
557+
PRIMARY KEY (`id`)
558+
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 COMMENT='comment1'
559+
/*!50100 PARTITION BY KEY (id) */
560+
DROP TABLE t1;
561+
#test alter table with and without ENGINE clause
562+
CREATE TABLE t1(id INT, PRIMARY KEY(id)) ENGINE=NDB;
563+
ALTER TABLE t1 ENGINE=NDB PARTITION BY KEY(id);
564+
SHOW CREATE TABLE t1;
565+
Table Create Table
566+
t1 CREATE TABLE `t1` (
567+
`id` int(11) NOT NULL DEFAULT '0',
568+
PRIMARY KEY (`id`)
569+
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
570+
/*!50100 PARTITION BY KEY (id) */
571+
DROP TABLE t1;
572+
CREATE TABLE t1(id INT, PRIMARY KEY(id)) ENGINE=NDB;
573+
ALTER TABLE t1 PARTITION BY KEY(id);
574+
SHOW CREATE TABLE t1;
575+
Table Create Table
576+
t1 CREATE TABLE `t1` (
577+
`id` int(11) NOT NULL DEFAULT '0',
578+
PRIMARY KEY (`id`)
579+
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
580+
/*!50100 PARTITION BY KEY (id) */
581+
DROP TABLE t1;
549582
End of 5.1 tests

mysql-test/suite/ndb/r/ndb_autoinc.result

+77
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,80 @@ t3 CREATE TABLE `t3` (
3636
) ENGINE=MyISAM DEFAULT CHARSET=latin1
3737
DROP TABLE t1, t3;
3838
End of 5.1 tests
39+
set @@auto_increment_increment=4;
40+
set @@auto_increment_offset=1;
41+
set @@ndb_autoincrement_prefetch_sz=2;
42+
create table t1 (a int unsigned not null primary key auto_increment)
43+
engine ndb;
44+
insert into t1 values ();
45+
insert into t1 values (2);
46+
insert into t1 values ();
47+
insert into t1 values ();
48+
select * from t1 order by a;
49+
a
50+
1
51+
2
52+
5
53+
9
54+
drop table t1;
55+
set @@auto_increment_increment=2;
56+
set @@auto_increment_offset=1;
57+
First look at default SE behaviour on manual insert unaligned with
58+
offset + step
59+
create table t1 (a int unsigned not null primary key auto_increment);
60+
show variables like 'LAST_INSERT_ID';
61+
Variable_name Value
62+
last_insert_id 9
63+
insert into t1 values();
64+
show variables like 'LAST_INSERT_ID';
65+
Variable_name Value
66+
last_insert_id 1
67+
insert into t1 values(18);
68+
show variables like 'LAST_INSERT_ID';
69+
Variable_name Value
70+
last_insert_id 1
71+
insert into t1 values();
72+
show variables like 'LAST_INSERT_ID';
73+
Variable_name Value
74+
last_insert_id 19
75+
insert into t1 values();
76+
show variables like 'LAST_INSERT_ID';
77+
Variable_name Value
78+
last_insert_id 21
79+
insert into t1 values();
80+
show variables like 'LAST_INSERT_ID';
81+
Variable_name Value
82+
last_insert_id 23
83+
insert into t1 values(22);
84+
show variables like 'LAST_INSERT_ID';
85+
Variable_name Value
86+
last_insert_id 23
87+
insert into t1 values();
88+
show variables like 'LAST_INSERT_ID';
89+
Variable_name Value
90+
last_insert_id 25
91+
insert into t1 values(28);
92+
show variables like 'LAST_INSERT_ID';
93+
Variable_name Value
94+
last_insert_id 25
95+
insert into t1 values();
96+
show variables like 'LAST_INSERT_ID';
97+
Variable_name Value
98+
last_insert_id 29
99+
insert into t1 values();
100+
show variables like 'LAST_INSERT_ID';
101+
Variable_name Value
102+
last_insert_id 31
103+
select * from t1 order by a;
104+
a
105+
1
106+
18
107+
19
108+
21
109+
22
110+
23
111+
25
112+
28
113+
29
114+
31
115+
drop table t1;

mysql-test/suite/ndb/r/ndb_basic.result

+14-3
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,19 @@ Ndb_api_wait_scan_result_count_slave #
7474
Ndb_cluster_node_id #
7575
Ndb_config_from_host #
7676
Ndb_config_from_port #
77+
Ndb_conflict_epoch_delete_delete_count #
7778
Ndb_conflict_fn_epoch #
79+
Ndb_conflict_fn_epoch2 #
80+
Ndb_conflict_fn_epoch2_trans #
7881
Ndb_conflict_fn_epoch_trans #
7982
Ndb_conflict_fn_max #
8083
Ndb_conflict_fn_max_del_win #
8184
Ndb_conflict_fn_old #
85+
Ndb_conflict_last_conflict_epoch #
86+
Ndb_conflict_last_stable_epoch #
87+
Ndb_conflict_reflected_op_discard_count #
88+
Ndb_conflict_reflected_op_prepare_count #
89+
Ndb_conflict_refresh_op_count #
8290
Ndb_conflict_trans_conflict_commit_count #
8391
Ndb_conflict_trans_detect_iter_count #
8492
Ndb_conflict_trans_reject_count #
@@ -100,7 +108,6 @@ Ndb_pushed_queries_executed #
100108
Ndb_pushed_reads #
101109
Ndb_scan_count #
102110
Ndb_schema_locks_count #
103-
Ndb_slave_last_conflict_epoch #
104111
Ndb_slave_max_replicated_epoch #
105112
Ndb_sorted_scan_count #
106113
SHOW GLOBAL VARIABLES WHERE Variable_name LIKE 'ndb\_%' and
@@ -115,6 +122,7 @@ ndb_cluster_connection_pool #
115122
ndb_connectstring #
116123
ndb_deferred_constraints #
117124
ndb_distribution #
125+
ndb_eventbuffer_free_percent #
118126
ndb_eventbuffer_max_alloc #
119127
ndb_extra_logging #
120128
ndb_force_send #
@@ -125,6 +133,8 @@ ndb_log_apply_status #
125133
ndb_log_bin #
126134
ndb_log_binlog_index #
127135
ndb_log_empty_epochs #
136+
ndb_log_empty_update #
137+
ndb_log_exclusive_reads #
128138
ndb_log_orig #
129139
ndb_log_transaction_id #
130140
ndb_log_update_as_write #
@@ -1021,9 +1031,10 @@ drop table t1;
10211031
create table
10221032
abcdefghijklmnopqrstuvwxyz1234567890bcdefghijklmnopqrstuvwxyz123(id int
10231033
primary key) engine=ndb;
1024-
ERROR HY000: Got error 1059 'Unknown error code' from NDBCLUSTER
1034+
ERROR 42000: Identifier name 'abcdefghijklmnopqrstuvwxyz1234567890bcdefghijklmnopqrstuvwxyz123' is too long
10251035
show warnings;
10261036
Level Code Message
10271037
Warning 1059 Ndb has an internal limit of 63 bytes on the size of schema identifiers
1028-
Error 1296 Got error 1059 'Unknown error code' from NDBCLUSTER
1038+
Error 1059 Identifier name 'abcdefghijklmnopqrstuvwxyz1234567890bcdefghijklmnopqrstuvwxyz123' is too long
1039+
Error 1031 Table storage engine for 'abcdefghijklmnopqrstuvwxyz1234567890bcdefghijklmnopqrstuvwxyz123' doesn't have this option
10291040
End of 5.1 tests
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
create table t1 (
2+
a int,
3+
b int not null,
4+
c1 char(255),
5+
c2 char(255),
6+
key k1(b, c1, c2)
7+
)
8+
engine = ndb;
9+
insert into t1(a,b,c1,c2) values
10+
(0, 0, 0, 0),
11+
(1, 1, 1, 1),
12+
(2, 2, 2, 1),
13+
(3, 3, 3, 3),
14+
(4, 4, 4, 4),
15+
(5, 5, 5, 5),
16+
(6, 6, 6, 6),
17+
(7, 7, 7, 7),
18+
(8, 8, 8, 8),
19+
(9, 9, 9, 9);
20+
insert into t1 select a + 10, b, c1, c2 from t1;
21+
insert into t1 select a + 20, b, c1, c2 from t1;
22+
insert into t1 select a + 40, b, c1, c2 from t1;
23+
insert into t1 select a + 80, b, c1, c2 from t1;
24+
insert into t1 select a + 160, b, c1, c2 from t1;
25+
insert into t1 select a + 320, b, c1, c2 from t1;
26+
insert into t1 select a + 640, b, c1, c2 from t1;
27+
insert into t1 select a + 1280, b, c1, c2 from t1;
28+
explain
29+
select * from t1 as x, t1 as y
30+
where y.b = x.a and y.c1 = x.c1 and y.c2 = x.c1;
31+
id select_type table type possible_keys key key_len ref rows Extra
32+
1 SIMPLE x ALL NULL NULL NULL NULL 2560 Parent of 2 pushed join@1; Using where with pushed condition
33+
1 SIMPLE y ref k1 k1 516 test.x.a,test.x.c1,test.x.c1 10 Child of 'x' in pushed join@1
34+
select count(*) from t1 as x, t1 as y
35+
where y.b = x.a and y.c1 = x.c1 and y.c2 = x.c1;
36+
count(*)
37+
2304
38+
drop table t1;

mysql-test/suite/ndb/r/ndb_condition_pushdown.result

+13
Original file line numberDiff line numberDiff line change
@@ -2557,3 +2557,16 @@ insert into t1 values ('00:00:00'),('01:01:01');
25572557
select 1 from t1 where a >= NULL;
25582558
1
25592559
drop table t1;
2560+
#
2561+
# BUG#14798022 "CHAR (0)" DATATYPE CAUSING ERROR 1296
2562+
# Verify there is no push down support for char(0)
2563+
#
2564+
create table t1(a int, b char(0)) engine=ndbcluster;
2565+
insert into t1 values(1,''), (2, NULL);
2566+
explain select * from t1 where b = '';
2567+
id select_type table type possible_keys key key_len ref rows Extra
2568+
1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where
2569+
select * from t1 where b = '';
2570+
a b
2571+
1
2572+
drop table t1;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
select sum(high) < sum(total) from ndbinfo.ndb$pools
2+
where pool_name='Fired Trigger';
3+
sum(high) < sum(total)
4+
1
5+
create table num (n int);
6+
insert into num value (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
7+
CREATE TABLE t1 (
8+
a int NOT NULL,
9+
b int NOT NULL,
10+
c int NOT NULL,
11+
d int NOT NULL,
12+
PRIMARY KEY (`b`,`a`),
13+
unique key(d)
14+
) ENGINE=ndbcluster;
15+
insert into t1 select x1.n+x2.n*10+x3.n*100, 1, 1, 1+x1.n+x2.n*10+x3.n*100 from num as x1, num as x2, num as x3;
16+
ERROR HY000: Got temporary error 221 'Too many concurrently fired triggers (increase MaxNoOfFiredTriggers)' from NDBCLUSTER
17+
select sum(used) from ndbinfo.ndb$pools where pool_name='Fired Trigger';
18+
sum(used)
19+
0
20+
drop table num;
21+
drop table t1;

mysql-test/suite/ndb/r/ndb_fk_alter.result

+6-6
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ child CREATE TABLE `child` (
2222
PRIMARY KEY (`a`),
2323
UNIQUE KEY `b` (`b`) USING HASH,
2424
KEY `c` (`c`),
25-
CONSTRAINT `fk1` FOREIGN KEY(`a`) REFERENCES `parent` (`a`) ON DELETE NO ACTION ON UPDATE NO ACTION,
26-
CONSTRAINT `fk2` FOREIGN KEY(`b`) REFERENCES `parent` (`a`) ON DELETE NO ACTION ON UPDATE NO ACTION,
27-
CONSTRAINT `fk3` FOREIGN KEY(`c`) REFERENCES `parent` (`a`) ON DELETE NO ACTION ON UPDATE NO ACTION
25+
CONSTRAINT `fk1` FOREIGN KEY (`a`) REFERENCES `parent` (`a`) ON DELETE NO ACTION ON UPDATE NO ACTION,
26+
CONSTRAINT `fk2` FOREIGN KEY (`b`) REFERENCES `parent` (`a`) ON DELETE NO ACTION ON UPDATE NO ACTION,
27+
CONSTRAINT `fk3` FOREIGN KEY (`c`) REFERENCES `parent` (`a`) ON DELETE NO ACTION ON UPDATE NO ACTION
2828
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
2929
alter table child algorithm=inplace, drop foreign key fk1;
3030
show create table child;
@@ -36,8 +36,8 @@ child CREATE TABLE `child` (
3636
PRIMARY KEY (`a`),
3737
UNIQUE KEY `b` (`b`) USING HASH,
3838
KEY `c` (`c`),
39-
CONSTRAINT `fk2` FOREIGN KEY(`b`) REFERENCES `parent` (`a`) ON DELETE NO ACTION ON UPDATE NO ACTION,
40-
CONSTRAINT `fk3` FOREIGN KEY(`c`) REFERENCES `parent` (`a`) ON DELETE NO ACTION ON UPDATE NO ACTION
39+
CONSTRAINT `fk2` FOREIGN KEY (`b`) REFERENCES `parent` (`a`) ON DELETE NO ACTION ON UPDATE NO ACTION,
40+
CONSTRAINT `fk3` FOREIGN KEY (`c`) REFERENCES `parent` (`a`) ON DELETE NO ACTION ON UPDATE NO ACTION
4141
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
4242
alter table child algorithm=inplace, drop foreign key fk2;
4343
show create table child;
@@ -49,7 +49,7 @@ child CREATE TABLE `child` (
4949
PRIMARY KEY (`a`),
5050
UNIQUE KEY `b` (`b`) USING HASH,
5151
KEY `c` (`c`),
52-
CONSTRAINT `fk3` FOREIGN KEY(`c`) REFERENCES `parent` (`a`) ON DELETE NO ACTION ON UPDATE NO ACTION
52+
CONSTRAINT `fk3` FOREIGN KEY (`c`) REFERENCES `parent` (`a`) ON DELETE NO ACTION ON UPDATE NO ACTION
5353
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
5454
alter table child algorithm=inplace, drop foreign key fk3;
5555
show create table child;

0 commit comments

Comments
 (0)