Skip to content

Commit c48714a

Browse files
author
magnus.blaudd@oracle.com
committed
Bug#20009152 FIELD NAME NOT INCLUDED IN WARNING WHEN CONVERTING TO FIXED
- the push_warning_printf() now detects illegal format strings - there is one in ha_ndbcluster.cc which had gone undetected. - bug exists in 7.1+, not really a serious bug, just some extra "stuff" passed to the function.
1 parent a4a1e7e commit c48714a

17 files changed

+33
-33
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ a b
298298
6 203
299299
alter table t2 add c int;
300300
Warnings:
301-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
301+
Warning 1478 Converted FIXED field 'c' to DYNAMIC to enable on-line ADD COLUMN
302302
insert into t2 (b) values (301),(302),(303);
303303
select * from t2 where a = 9;
304304
a b c

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ ndb_show_tables completed.....
5353
set @t1_id = (select id from ndb_show_tables_results where name like '%t1%' and type like '%UserTable%');
5454
ALTER TABLE t1 ADD c INT;
5555
Warnings:
56-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
56+
Warning 1478 Converted FIXED field 'c' to DYNAMIC to enable on-line ADD COLUMN
5757

5858
ndb_show_tables completed.....
5959

@@ -84,7 +84,7 @@ ndb_show_tables completed.....
8484
set @t1_id = (select id from ndb_show_tables_results where name like '%t1%' and type like '%UserTable%');
8585
ALTER TABLE t1 ADD c INT;
8686
Warnings:
87-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
87+
Warning 1478 Converted FIXED field 'c' to DYNAMIC to enable on-line ADD COLUMN
8888

8989
ndb_show_tables completed.....
9090

@@ -495,34 +495,34 @@ set @t1_id = (select id from ndb_show_tables_results where name like '%t1%' and
495495
ALTER ONLINE TABLE t1 ADD c FLOAT;
496496
Warnings:
497497
Warning 1287 'ONLINE' is deprecated and will be removed in a future release. Please use ALGORITHM=INPLACE instead
498-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
498+
Warning 1478 Converted FIXED field 'c' to DYNAMIC to enable on-line ADD COLUMN
499499
*******************************
500500
* Add column d as nullable DOUBLE
501501
*******************************
502502
ALTER ONLINE TABLE t1 ADD d DOUBLE UNSIGNED;
503503
Warnings:
504504
Warning 1287 'ONLINE' is deprecated and will be removed in a future release. Please use ALGORITHM=INPLACE instead
505-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
505+
Warning 1478 Converted FIXED field 'd' to DYNAMIC to enable on-line ADD COLUMN
506506
*******************************
507507
* Add column e as nullable DECIMAL
508508
*******************************
509509
ALTER ONLINE TABLE t1 ADD e DECIMAL(5,2);
510510
Warnings:
511511
Warning 1287 'ONLINE' is deprecated and will be removed in a future release. Please use ALGORITHM=INPLACE instead
512-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
512+
Warning 1478 Converted FIXED field 'e' to DYNAMIC to enable on-line ADD COLUMN
513513
*******************************
514514
* Add column f as nullable DATETIME
515515
*******************************
516516
ALTER ONLINE TABLE t1 ADD f DATETIME;
517517
Warnings:
518518
Warning 1287 'ONLINE' is deprecated and will be removed in a future release. Please use ALGORITHM=INPLACE instead
519-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
519+
Warning 1478 Converted FIXED field 'f' to DYNAMIC to enable on-line ADD COLUMN
520520
*******************************
521521
* Add column g as nullable BINARY
522522
*******************************
523523
ALTER TABLE t1 ADD g BINARY(4);
524524
Warnings:
525-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
525+
Warning 1478 Converted FIXED field 'g' to DYNAMIC to enable on-line ADD COLUMN
526526

527527
ndb_show_tables completed.....
528528

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ set @t1_id = (select id from ndb_show_tables_results where name like '%t1%' and
3333
ALTER ONLINE TABLE t1 ADD b INT;
3434
Warnings:
3535
Warning 1287 'ONLINE' is deprecated and will be removed in a future release. Please use ALGORITHM=INPLACE instead
36-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
36+
Warning 1478 Converted FIXED field 'b' to DYNAMIC to enable on-line ADD COLUMN
3737

3838
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3939
~ Check table t1 ID has not changed
@@ -59,7 +59,7 @@ update t1 set b = 0 where pk = 1;
5959
ALTER ONLINE TABLE t1 ADD c INT;
6060
Warnings:
6161
Warning 1287 'ONLINE' is deprecated and will be removed in a future release. Please use ALGORITHM=INPLACE instead
62-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
62+
Warning 1478 Converted FIXED field 'c' to DYNAMIC to enable on-line ADD COLUMN
6363

6464
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6565
~ Check table t1 ID has not changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ insert into t1 values (5,5),(6,6);
1212
update t1 set b = 0 where a = 6;
1313
ALTER TABLE t1 ADD c CHAR(19), ADD d VARCHAR(255), ADD e char(255);
1414
Warnings:
15-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
16-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
17-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
15+
Warning 1478 Converted FIXED field 'c' to DYNAMIC to enable on-line ADD COLUMN
16+
Warning 1478 Converted FIXED field 'd' to DYNAMIC to enable on-line ADD COLUMN
17+
Warning 1478 Converted FIXED field 'e' to DYNAMIC to enable on-line ADD COLUMN
1818
update t1 set b = 0 where a = 2;
1919
update t1 set b = 0 where a = 4;
2020
update t1 set b = 0 where a = 5;
@@ -44,9 +44,9 @@ insert into t1 values (5,5),(6,6);
4444
update t1 set b = 0 where a = 6;
4545
ALTER TABLE t1 ADD c CHAR(19), ADD d VARCHAR(255), ADD e char(255);
4646
Warnings:
47-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
48-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
49-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
47+
Warning 1478 Converted FIXED field 'c' to DYNAMIC to enable on-line ADD COLUMN
48+
Warning 1478 Converted FIXED field 'd' to DYNAMIC to enable on-line ADD COLUMN
49+
Warning 1478 Converted FIXED field 'e' to DYNAMIC to enable on-line ADD COLUMN
5050
update t1 set b = 0 where a = 2;
5151
update t1 set b = 0 where a = 4;
5252
update t1 set b = 0 where a = 5;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ name
622622
'NDB$FKM_<child_id>_<id>_t2'
623623
alter table t1 add column c int;
624624
Warnings:
625-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
625+
Warning 1478 Converted FIXED field 'c' to DYNAMIC to enable on-line ADD COLUMN
626626

627627
ndb_show_tables completed.....
628628

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ gc geometrycollection YES NULL
436436
gm geometry YES NULL
437437
ALTER TABLE t1 ADD fid INT;
438438
Warnings:
439-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
439+
Warning 1478 Converted FIXED field 'fid' to DYNAMIC to enable on-line ADD COLUMN
440440
SHOW FIELDS FROM t1;
441441
Field Type Null Key Default Extra
442442
a int(11) NO PRI NULL auto_increment
@@ -990,7 +990,7 @@ gc geometrycollection YES NULL
990990
gm geometry YES NULL
991991
ALTER TABLE t1 ADD fid INT;
992992
Warnings:
993-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
993+
Warning 1478 Converted FIXED field 'fid' to DYNAMIC to enable on-line ADD COLUMN
994994
SHOW FIELDS FROM t1;
995995
Field Type Null Key Default Extra
996996
a int(11) NO PRI NULL auto_increment

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ CREATE TABLE t3 LIKE t2;
1818
1
1919
ALTER TABLE t3 ADD COLUMN b int default NULL;
2020
Warnings:
21-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
21+
Warning 1478 Converted FIXED field 'b' to DYNAMIC to enable on-line ADD COLUMN
2222
@ndb_schema_locks_count:=VARIABLE_VALUE-@ndb_init_schema_locks_count
2323
1
2424
INSERT INTO t2 VALUES(1);
@@ -76,7 +76,7 @@ CREATE TABLE t3 LIKE t10;
7676
ERROR HY000: Table 't3' was not locked with LOCK TABLES
7777
ALTER TABLE t10 ADD COLUMN b int default NULL;
7878
Warnings:
79-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
79+
Warning 1478 Converted FIXED field 'b' to DYNAMIC to enable on-line ADD COLUMN
8080
@ndb_schema_locks_count:=VARIABLE_VALUE-@ndb_init_schema_locks_count
8181
1
8282
TRUNCATE TABLE t10;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,10 @@ b varchar(6144)
366366
# alter causing varchar to become 'dynamic'
367367
alter table t1 add column c int;
368368
Warnings:
369-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
369+
Warning 1478 Converted FIXED field 'c' to DYNAMIC to enable on-line ADD COLUMN
370370
show warnings;
371371
Level Code Message
372-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
372+
Warning 1478 Converted FIXED field 'c' to DYNAMIC to enable on-line ADD COLUMN
373373
insert into t1 values (1,repeat('b',2000), 10);
374374
insert into t1 values (2,repeat('t',2000), 20);
375375
insert into t1 values (3,repeat('g',2000), 30);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ th un de length(rb) length(al)
6464
5 10 5 990 60010
6565
alter table t1 add column extra varchar(2000);
6666
Warnings:
67-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
67+
Warning 1478 Converted FIXED field 'extra' to DYNAMIC to enable on-line ADD COLUMN
6868
update t1 set extra = repeat(rb, 2);
6969
select th, un, de, length(rb), length(al), length(extra)
7070
from t1

mysql-test/suite/ndb_binlog/r/ndb_binlog_basic.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index;
1313
delete from t1;
1414
alter table t1 add (b int);
1515
Warnings:
16-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
16+
Warning 1478 Converted FIXED field 'b' to DYNAMIC to enable on-line ADD COLUMN
1717
insert into t1 values (3,3),(4,4);
1818
alter table t1 rename t2;
1919
begin;

mysql-test/suite/ndb_binlog/r/ndb_binlog_ddl_multi.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ reset master;
2222
reset master;
2323
alter table t2 add column (b int);
2424
Warnings:
25-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
25+
Warning 1478 Converted FIXED field 'b' to DYNAMIC to enable on-line ADD COLUMN
2626
show binlog events from <binlog_start>;
2727
Log_name Pos Event_type Server_id End_log_pos Info
2828
mysqld-bin.000001 # Query 1 # use `test`; alter table t2 add column (b int)

mysql-test/suite/ndb_binlog/r/ndb_binlog_discover_multi.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ engine=ndbcluster;
99
alter online table t1 add column b varchar(16);
1010
Warnings:
1111
Warning 1287 'ONLINE' is deprecated and will be removed in a future release. Please use ALGORITHM=INPLACE instead
12-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
12+
Warning 1478 Converted FIXED field 'b' to DYNAMIC to enable on-line ADD COLUMN
1313
show tables;
1414
Tables_in_test
1515
t1

mysql-test/suite/ndb_binlog/r/ndb_binlog_log_bin.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ create table t2 (a int key, b int) engine=ndb;
1010
insert into t1 values (1,1);
1111
alter table t1 add c int;
1212
Warnings:
13-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
13+
Warning 1478 Converted FIXED field 'c' to DYNAMIC to enable on-line ADD COLUMN
1414
show binlog events from <binlog_start>;
1515
Log_name Pos Event_type Server_id End_log_pos Info
1616
reset master;

mysql-test/suite/ndb_rpl/r/ndb_rpl_basic.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ CREATE TABLE t1 (c1 INT KEY) ENGINE=NDB;
154154
INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
155155
ALTER TABLE t1 ADD c2 INT;
156156
Warnings:
157-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
157+
Warning 1478 Converted FIXED field 'c2' to DYNAMIC to enable on-line ADD COLUMN
158158
SELECT * FROM t1 ORDER BY c1;
159159
c1 c2
160160
1 NULL

mysql-test/suite/rpl_ndb/r/rpl_ndb_extra_col_master.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ include/rpl_reset.inc
624624
*** Master Data Insert ***
625625
ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7;
626626
Warnings:
627-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
627+
Warning 1478 Converted FIXED field 'c2' to DYNAMIC to enable on-line ADD COLUMN
628628
set @b1 = 'b1b1b1b1';
629629
set @b1 = concat(@b1,@b1);
630630
INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00),
@@ -1480,7 +1480,7 @@ include/rpl_reset.inc
14801480
*** Master Data Insert ***
14811481
ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7;
14821482
Warnings:
1483-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
1483+
Warning 1478 Converted FIXED field 'c2' to DYNAMIC to enable on-line ADD COLUMN
14841484
set @b1 = 'b1b1b1b1';
14851485
set @b1 = concat(@b1,@b1);
14861486
INSERT INTO t15 () VALUES(1,@b1,'Kyle',DEFAULT,DEFAULT,3.00),

mysql-test/suite/rpl_ndb/r/rpl_ndb_extra_col_slave.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ c1 c2 c3 c4 c5 c6 c7
423423
*** Add column on master that is a Extra on Slave ***
424424
ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5;
425425
Warnings:
426-
Warning 1478 Converted FIXED field to DYNAMIC to enable on-line ADD COLUMN
426+
Warning 1478 Converted FIXED field 'c6' to DYNAMIC to enable on-line ADD COLUMN
427427
********************************************************
428428
*** Expect slave to fail with Error ER_DUP_FIELDNAME ***
429429
********************************************************

sql/ha_ndbcluster.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17296,7 +17296,7 @@ ha_ndbcluster::prepare_inplace_alter_table(TABLE *altered_table,
1729617296
{
1729717297
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
1729817298
ER_ILLEGAL_HA_CREATE_OPTION,
17299-
"Converted FIXED field to DYNAMIC "
17299+
"Converted FIXED field '%s' to DYNAMIC "
1730017300
"to enable on-line ADD COLUMN",
1730117301
field->field_name);
1730217302
}

0 commit comments

Comments
 (0)