Skip to content

Commit

Permalink
misc after-merge changes:
Browse files Browse the repository at this point in the history
* remove new InnoDB-specific ER_ and HA_ERR_ codes
* renamed few old ER_ and HA_ERR_ error messages to be less MyISAM-specific
* remove duplicate enum definitions (durability_properties, icp_result)
* move new mysql-test include files to their owner suite
* rename xtradb.rdiff files to *-disabled
* remove mistakenly committed helper perl module
* remove long obsolete handler::ha_statistic_increment() method
* restore the standard C xid_t structure to not have setters and getters
* remove xid_t::reset that was cleaning too much
* move MySQL-5.7 ER_ codes where they belong
* fir innodb to include service_wsrep.h not internal wsrep headers
* update tests and results
  • Loading branch information
vuvova committed Sep 10, 2016
1 parent d8cbad0 commit d019af4
Show file tree
Hide file tree
Showing 47 changed files with 141 additions and 342 deletions.
34 changes: 8 additions & 26 deletions include/my_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -497,24 +497,19 @@ enum ha_base_keytype {
#define HA_ERR_DISK_FULL 189
#define HA_ERR_INCOMPATIBLE_DEFINITION 190
#define HA_ERR_FTS_TOO_MANY_WORDS_IN_PHRASE 191 /* Too many words in a phrase */
#define HA_ERR_DECRYPTION_FAILED 192 /* Table encrypted but
decypt failed */
#define HA_ERR_DECRYPTION_FAILED 192 /* Table encrypted but decypt failed */
#define HA_ERR_FK_DEPTH_EXCEEDED 193 /* FK cascade depth exceeded */
#define HA_MISSING_CREATE_OPTION 194 /* Option Missing during Create */
#define HA_ERR_SE_OUT_OF_MEMORY 195 /* Out of memory in storage engine */
#define HA_ERR_TABLE_CORRUPT 196 /* Table/Clustered index is corrupted. */
#define HA_ERR_QUERY_INTERRUPTED 197 /* The query was interrupted */
#define HA_ERR_TABLESPACE_MISSING 198 /* Missing Tablespace */
#define HA_ERR_TABLESPACE_IS_NOT_EMPTY 199 /* Tablespace is not empty */
#define HA_ERR_WRONG_FILE_NAME 200 /* Invalid Filename */
#define HA_ERR_NOT_ALLOWED_COMMAND 201 /* Operation is not allowed */
#define HA_ERR_COMPUTE_FAILED 202 /* Compute generated column value failed */
#define HA_ERR_INNODB_READ_ONLY 203 /* InnoDB is in read only mode */
#define HA_ERR_LAST 203 /* Copy of last error nr * */
#define HA_ERR_TABLESPACE_MISSING 194 /* Missing Tablespace */
#define HA_ERR_LAST 194 /* Copy of last error nr * */

/* Number of different errors */
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)

/* aliases */
#define HA_ERR_TABLE_CORRUPT HA_ERR_WRONG_IN_RECORD
#define HA_ERR_QUERY_INTERRUPTED HA_ERR_ABORTED_BY_USER
#define HA_ERR_NOT_ALLOWED_COMMAND HA_ERR_WRONG_COMMAND

/* Other constants */

#define HA_NAMELEN 64 /* Max length of saved filename */
Expand Down Expand Up @@ -643,17 +638,4 @@ C_MODE_START
typedef void (* invalidator_by_filename)(const char * filename);
C_MODE_END


enum durability_properties
{
/*
Preserves the durability properties defined by the engine */
HA_REGULAR_DURABILITY= 0,
/*
Ignore the durability properties defined by the engine and
write only in-memory entries.
*/
HA_IGNORE_DURABILITY= 1
};

#endif /* _my_base_h */
23 changes: 11 additions & 12 deletions include/my_handler_errors.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,18 @@

static const char *handler_error_messages[]=
{
/* 120 */
"Didn't find key on read or update",
"Duplicate key on write or update",
"Internal (unspecified) error in handler",
"Someone has changed the row since it was read (while the table was locked to prevent it)",
"Wrong index given to function",
"Undefined handler error 125",
"Index file is crashed",
"Record file is crashed",
"Index is corrupted",
"Table file is corrupted",
"Out of memory in engine",
"Undefined handler error 129",
/* 130 */
"Incorrect file format",
"Command not supported by database",
"Old database file",
Expand All @@ -43,6 +45,7 @@ static const char *handler_error_messages[]=
"No more records (read after end of file)",
"Unsupported extension used for table",
"Too big row",
/* 140 */
"Wrong create options",
"Duplicate unique key or constraint on write or update",
"Unknown character set used in table",
Expand All @@ -53,6 +56,7 @@ static const char *handler_error_messages[]=
"Lock table is full; Restart program with a larger lock table",
"Updates are not allowed under a read only transactions",
"Lock deadlock; Retry transaction",
/* 150 */
"Foreign key constraint is incorrectly formed",
"Cannot add a child row",
"Cannot delete a parent row",
Expand All @@ -63,6 +67,7 @@ static const char *handler_error_messages[]=
"Could not connect to storage engine",
"Unexpected null pointer found when using spatial index",
"The table changed in storage engine",
/* 160 */
"There's no partition in table for the given value",
"Row-based binary logging of row failed",
"Index needed in foreign key constraint",
Expand All @@ -73,6 +78,7 @@ static const char *handler_error_messages[]=
"Failed to set row auto increment value",
"Unknown (generic) error from engine",
"Record was not update. Original values was same as new values",
/* 170 */
"It is not possible to log this statement",
"The event was corrupt, leading to illegal data being read",
"The table is of a new format not supported by this version",
Expand All @@ -83,6 +89,7 @@ static const char *handler_error_messages[]=
"Too many active concurrent transactions",
"Record not matching the given partition set",
"Index column length exceeds limit",
/* 180 */
"Index corrupted",
"Undo record too big",
"Invalid InnoDB FTS Doc ID",
Expand All @@ -93,20 +100,12 @@ static const char *handler_error_messages[]=
"Row is not visible by the current transaction",
"Operation was interrupted by end user (probably kill command?)",
"Disk full",
/* 190 */
"Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump and restore the table to fix this",
"Too many words in a FTS phrase or proximity search",
"Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.",
"Foreign key cascade delete/update exceeds max depth",
"Table storage engine found required create option missing",
"Out of memory in storage engine",
"Operation cannot be performed. The table is missing, corrupt or contains bad data.",
"Query execution was interrupted",
"Tablespace is missing for table",
"Tablespace is not empty",
"Incorrect File Name",
"Table storage engine found required create option missing",
"Compute virtual column value failed",
"InnoDB is in read only mode"
"Tablespace is missing for table"
};

#endif /* MYSYS_MY_HANDLER_ERRORS_INCLUDED */
48 changes: 0 additions & 48 deletions include/my_icp.h

This file was deleted.

2 changes: 0 additions & 2 deletions mysql-test/include/have_innodb_16k.inc
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
--disable_warnings
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_page_size' AND variable_value = 16384`)
{
--skip Test requires InnoDB with 16k Page size.
}
--enable_warnings
4 changes: 0 additions & 4 deletions mysql-test/include/have_innodb_max_16k.inc

This file was deleted.

18 changes: 0 additions & 18 deletions mysql-test/include/have_numa.inc

This file was deleted.

1 change: 0 additions & 1 deletion mysql-test/mysql-test-run.pl
Original file line number Diff line number Diff line change
Expand Up @@ -4400,7 +4400,6 @@ ($$)
qr/Slave SQL thread retried transaction/,
qr/Slave \(additional info\)/,
qr/Incorrect information in file/,
qr/Incorrect key file for table .*crashed.*/,
qr/Slave I\/O: Get master SERVER_ID failed with error:.*/,
qr/Slave I\/O: Get master clock failed with error:.*/,
qr/Slave I\/O: Get master COLLATION_SERVER failed with error:.*/,
Expand Down
1 change: 1 addition & 0 deletions mysql-test/r/merge_debug.result
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
set @default_storage_engine= @@global.storage_engine;
set global storage_engine=myisam;
set session storage_engine=myisam;
call mtr.add_suppression("Index for table .*crashed' is corrupt; try to repair it");
drop table if exists crashed,t2,t3,t4;
SET @orig_debug=@@debug;
CREATE TABLE crashed (c1 INT);
Expand Down
1 change: 0 additions & 1 deletion mysql-test/suite/handler/innodb.result
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,6 @@ optimize table t1;
connection default;
handler t1 read next;
c1
1
handler t1 close;
connection con2;
Table Op Msg_type Msg_text
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
24 changes: 12 additions & 12 deletions mysql-test/suite/innodb/t/innodb.test
Original file line number Diff line number Diff line change
Expand Up @@ -1141,10 +1141,10 @@ insert into t1 values
(244, 243), (245, 244), (246, 245), (247, 246),
(248, 247), (249, 248), (250, 249), (251, 250),
(252, 251), (253, 252), (254, 253), (255, 254);
--error 4029,1451
--error ER_GET_ERRMSG,ER_ROW_IS_REFERENCED_2
delete from t1 where id=0;
delete from t1 where id=255;
--error 0,1451
--error 0,ER_ROW_IS_REFERENCED_2
delete from t1 where id=0;

drop table t1;
Expand Down Expand Up @@ -1636,10 +1636,10 @@ INSERT INTO t2 VALUES(2);
INSERT INTO t1 VALUES(1);
INSERT INTO t2 VALUES(1);

--error 1451
--error ER_ROW_IS_REFERENCED_2
DELETE FROM t1 WHERE id = 1;

--error 1451, 1217
--error ER_ROW_IS_REFERENCED_2, 1217
DROP TABLE t1;

SET FOREIGN_KEY_CHECKS=0;
Expand Down Expand Up @@ -1765,11 +1765,11 @@ insert into t2 values(2);
insert into t4 values(2);
insert into t2 values(1);
insert into t4 values(1);
-- error 1451
-- error ER_ROW_IS_REFERENCED_2
update t1 set a=2;
-- error 1452
update t2 set a=2;
-- error 1451
-- error ER_ROW_IS_REFERENCED_2
update t3 set a=2;
-- error 1452
update t4 set a=2;
Expand Down Expand Up @@ -1838,23 +1838,23 @@ insert into t2 values(0x41);
select hex(s1) from t2;
update t1 set s1=0x123456 where a=2;
select hex(s1) from t2;
-- error 1451
-- error ER_ROW_IS_REFERENCED_2
update t1 set s1=0x12 where a=1;
-- error 1451
-- error ER_ROW_IS_REFERENCED_2
update t1 set s1=0x12345678 where a=1;
-- error 1451
-- error ER_ROW_IS_REFERENCED_2
update t1 set s1=0x123457 where a=1;
update t1 set s1=0x1220 where a=1;
select hex(s1) from t2;
update t1 set s1=0x1200 where a=1;
select hex(s1) from t2;
update t1 set s1=0x4200 where a=1;
select hex(s1) from t2;
-- error 1451
-- error ER_ROW_IS_REFERENCED_2
delete from t1 where a=1;
delete from t1 where a=2;
update t2 set s1=0x4120;
-- error 1451
-- error ER_ROW_IS_REFERENCED_2
delete from t1;
delete from t1 where a!=3;
select a,hex(s1) from t1;
Expand All @@ -1873,7 +1873,7 @@ select hex(s1) from t2;
update t1 set s1=0x12 where a=2;
select hex(s1) from t2;
delete from t1 where a=1;
-- error 1451
-- error ER_ROW_IS_REFERENCED_2
delete from t1 where a=2;
select a,hex(s1) from t1;
select hex(s1) from t2;
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions mysql-test/suite/plugins/r/audit_null_debug.result
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
set @old_dbug=@@debug_dbug;
call mtr.add_suppression("Incorrect key file for table.*mysql.plugin.MYI");
call mtr.add_suppression("Index for table.*mysql.plugin.MYI");
SET debug_dbug='+d,myisam_pretend_crashed_table_on_usage';
install plugin audit_null soname 'adt_null';
ERROR HY000: Incorrect key file for table './mysql/plugin.MYI'; try to repair it
ERROR HY000: Index for table './mysql/plugin.MYI' is corrupt; try to repair it
SET debug_dbug=@old_dbug;
install plugin audit_null soname 'adt_null';
SET debug_dbug='+d,myisam_pretend_crashed_table_on_usage';
uninstall plugin audit_null;
ERROR HY000: Incorrect key file for table './mysql/plugin.MYI'; try to repair it
ERROR HY000: Index for table './mysql/plugin.MYI' is corrupt; try to repair it
SET debug_dbug=@old_dbug;
uninstall plugin audit_null;
ERROR 42000: PLUGIN audit_null does not exist
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/plugins/t/audit_null_debug.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if (!$ADT_NULL_SO) {
}

set @old_dbug=@@debug_dbug;
call mtr.add_suppression("Incorrect key file for table.*mysql.plugin.MYI");
call mtr.add_suppression("Index for table.*mysql.plugin.MYI");

#
# MySQL BUG#14485479 - INSTALL AUDIT PLUGIN HANGS IF WE TRY TO DISABLE AND ENABLED DURING DDL OPERATION
Expand Down
3 changes: 0 additions & 3 deletions mysql-test/suite/rpl/disabled.def
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@
rpl_spec_variables : BUG#11755836 2009-10-27 jasonh rpl_spec_variables fails on PB2 hpux
rpl_get_master_version_and_clock : Bug#11766137 Jan 05 2011 joro Valgrind warnings rpl_get_master_version_and_clock
rpl_partition_archive : MDEV-5077 2013-09-27 svoj Cannot exchange partition with archive table



10 changes: 0 additions & 10 deletions mysql-test/suite/sys_vars/r/innodb_numa_interleave_basic.result

This file was deleted.

Loading

0 comments on commit d019af4

Please sign in to comment.