Commit e76bb8c6 authored by Marc Alff's avatar Marc Alff
Browse files

Bug#36768 (partition_info::check_partition_info() reports mal formed

warnings)

Before this fix, several places in the code would raise a warning with an
error code 0, making it impossible for a stored procedure, a connector,
or a client application to trigger logic to handle the warning.
Also, the warning text was hard coded, and therefore not translated.

With this fix, new errors numbers have been created to represent these
warnings, and the warning text is coded in the errmsg.txt file.
parent 1b488e52
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -24,8 +24,8 @@ data directory='/not/existing'
  index directory='/not/existing'
);
Warnings:
Warning	0	DATA DIRECTORY option ignored
Warning	0	INDEX DIRECTORY option ignored
Warning	1616	<DATA DIRECTORY> option ignored
Warning	1616	<INDEX DIRECTORY> option ignored
show create table t2;
Table	Create Table
t2	CREATE TABLE `t2` (
+2 −2
Original line number Diff line number Diff line
@@ -101,8 +101,8 @@ data directory='/not/existing'
    index directory='/not/existing'
);
Warnings:
Warning	0	DATA DIRECTORY option ignored
Warning	0	INDEX DIRECTORY option ignored
Warning	1616	<DATA DIRECTORY> option ignored
Warning	1616	<INDEX DIRECTORY> option ignored
show create table t2;
Table	Create Table
t2	CREATE TABLE `t2` (
+6 −6
Original line number Diff line number Diff line
@@ -15,16 +15,16 @@ DATA DIRECTORY = 'E:/mysqltest/p2Data'
    INDEX DIRECTORY = 'F:/mysqltest/p2Index'
);
Warnings:
Warning	0	DATA DIRECTORY option ignored
Warning	0	INDEX DIRECTORY option ignored
Warning	0	DATA DIRECTORY option ignored
Warning	0	INDEX DIRECTORY option ignored
Warning	1616	<DATA DIRECTORY> option ignored
Warning	1616	<INDEX DIRECTORY> option ignored
Warning	1616	<DATA DIRECTORY> option ignored
Warning	1616	<INDEX DIRECTORY> option ignored
INSERT INTO t1 VALUES (NULL, "first", 1);
INSERT INTO t1 VALUES (NULL, "second", 2);
INSERT INTO t1 VALUES (NULL, "third", 3);
ALTER TABLE t1 ADD PARTITION (PARTITION p3 DATA DIRECTORY = 'G:/mysqltest/p3Data' INDEX DIRECTORY = 'H:/mysqltest/p3Index');
Warnings:
Warning	0	DATA DIRECTORY option ignored
Warning	0	INDEX DIRECTORY option ignored
Warning	1616	<DATA DIRECTORY> option ignored
Warning	1616	<INDEX DIRECTORY> option ignored
INSERT INTO t1 VALUES (NULL, "last", 4);
DROP TABLE t1;
+5 −5
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ drop database mysqltest;
create table t1 (a int not null) engine=myisam;
alter table t1 data directory="MYSQLTEST_VARDIR/tmp";
Warnings:
Warning	0	DATA DIRECTORY option ignored
Warning	1616	<DATA DIRECTORY> option ignored
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
@@ -88,7 +88,7 @@ t1 CREATE TABLE `t1` (
alter table t1 add b int;
alter table t1 data directory="MYSQLTEST_VARDIR/log";
Warnings:
Warning	0	DATA DIRECTORY option ignored
Warning	1616	<DATA DIRECTORY> option ignored
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
@@ -97,7 +97,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t1 index directory="MYSQLTEST_VARDIR/log";
Warnings:
Warning	0	INDEX DIRECTORY option ignored
Warning	1616	<INDEX DIRECTORY> option ignored
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
@@ -164,8 +164,8 @@ ERROR HY000: Can't create/write to file 'TEST_DIR/master-data_var/t1.MYI' (Errco
SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE='NO_DIR_IN_CREATE';
CREATE TABLE t1(a INT) DATA DIRECTORY='MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY='MYSQLTEST_VARDIR/tmp';
Warnings:
Warning	0	DATA DIRECTORY option ignored
Warning	0	INDEX DIRECTORY option ignored
Warning	1616	<DATA DIRECTORY> option ignored
Warning	1616	<INDEX DIRECTORY> option ignored
DROP TABLE t1;
SET @@SQL_MODE=@OLD_SQL_MODE;
End of 5.1 tests
+2 −2
Original line number Diff line number Diff line
@@ -9,8 +9,8 @@ drop table nu;
drop table if exists t1;
CREATE TABLE t1 ( `ID` int(6) ) data directory 'c:/tmp/' index directory 'c:/tmp/' engine=MyISAM;
Warnings:
Warning	0	DATA DIRECTORY option ignored
Warning	0	INDEX DIRECTORY option ignored
Warning	1616	<DATA DIRECTORY> option ignored
Warning	1616	<INDEX DIRECTORY> option ignored
drop table t1;
CREATE TABLE t1 (a int, b int);
INSERT INTO t1 VALUES (1,1);
Loading