Commit 85cc17d3 authored by Mattias Jonsson's avatar Mattias Jonsson

Bug#36001: Partitions: spelling and using some error messages

Backport from 6.0

Changed error message to show that it is partitioning
that does not support foreign keys yet.

Changed spelling from British english to American english.

mysql-test/r/partition.result:
  Bug#36001: Partitions: spelling and using some error messages
  
  Backport from 6.0
  
  Changed spelling from British english to American english.
mysql-test/r/partition_mgm_err.result:
  Bug#36001: Partitions: spelling and using some error messages
  
  Backport from 6.0
  
  Changed spelling from British english to American english.
mysql-test/t/partition.test:
  Bug#36001: Partitions: spelling and using some error messages
  
  Backport from 6.0
  
  Added test for verifying error message
sql/share/errmsg.txt:
  Bug#36001: Partitions: spelling and using some error messages
  
  Backport from 6.0
  
  Changed spelling from British english to American english.
sql/sql_table.cc:
  Bug#36001: Partitions: spelling and using some error messages
  
  Backport from 6.0
  
  Using a better error message.
parent d0ece331
SET @old_general_log= @@global.general_log; SET @old_general_log= @@global.general_log;
drop table if exists t1, t2; drop table if exists t1, t2;
CREATE TABLE t1 (a INT, FOREIGN KEY (a) REFERENCES t0 (a))
ENGINE=MyISAM
PARTITION BY HASH (a);
ERROR HY000: Foreign key clause is not yet supported in conjunction with partitioning
CREATE TABLE t1 ( CREATE TABLE t1 (
pk INT NOT NULL AUTO_INCREMENT, pk INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY (pk) PRIMARY KEY (pk)
......
...@@ -25,13 +25,13 @@ ALTER TABLE t1 DROP PARTITION x10, x1, x2, x3; ...@@ -25,13 +25,13 @@ ALTER TABLE t1 DROP PARTITION x10, x1, x2, x3;
ERROR HY000: Error in list of partitions to DROP ERROR HY000: Error in list of partitions to DROP
ALTER TABLE t1 REORGANIZE PARTITION x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10 INTO ALTER TABLE t1 REORGANIZE PARTITION x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10 INTO
(PARTITION x11 VALUES LESS THAN (22)); (PARTITION x11 VALUES LESS THAN (22));
ERROR HY000: More partitions to reorganise than there are partitions ERROR HY000: More partitions to reorganize than there are partitions
ALTER TABLE t1 REORGANIZE PARTITION x0,x1,x2 INTO ALTER TABLE t1 REORGANIZE PARTITION x0,x1,x2 INTO
(PARTITION x3 VALUES LESS THAN (6)); (PARTITION x3 VALUES LESS THAN (6));
ERROR HY000: Duplicate partition name x3 ERROR HY000: Duplicate partition name x3
ALTER TABLE t1 REORGANIZE PARTITION x0, x2 INTO ALTER TABLE t1 REORGANIZE PARTITION x0, x2 INTO
(PARTITION x11 VALUES LESS THAN (2)); (PARTITION x11 VALUES LESS THAN (2));
ERROR HY000: When reorganising a set of partitions they must be in consecutive order ERROR HY000: When reorganizing a set of partitions they must be in consecutive order
ALTER TABLE t1 REORGANIZE PARTITION x0, x1, x1 INTO ALTER TABLE t1 REORGANIZE PARTITION x0, x1, x1 INTO
(PARTITION x11 VALUES LESS THAN (4)); (PARTITION x11 VALUES LESS THAN (4));
ERROR HY000: Error in list of partitions to REORGANIZE ERROR HY000: Error in list of partitions to REORGANIZE
......
...@@ -16,6 +16,14 @@ SET @old_general_log= @@global.general_log; ...@@ -16,6 +16,14 @@ SET @old_general_log= @@global.general_log;
drop table if exists t1, t2; drop table if exists t1, t2;
--enable_warnings --enable_warnings
#
# Bug#36001: Partitions: spelling and using some error messages
#
--error ER_FOREIGN_KEY_ON_PARTITIONED
CREATE TABLE t1 (a INT, FOREIGN KEY (a) REFERENCES t0 (a))
ENGINE=MyISAM
PARTITION BY HASH (a);
# #
# Bug#40954: Crash if range search and order by. # Bug#40954: Crash if range search and order by.
# #
......
...@@ -5775,9 +5775,9 @@ ER_PARTITION_MGMT_ON_NONPARTITIONED ...@@ -5775,9 +5775,9 @@ ER_PARTITION_MGMT_ON_NONPARTITIONED
ger "Partitionsverwaltung einer nicht partitionierten Tabelle ist nicht mglich" ger "Partitionsverwaltung einer nicht partitionierten Tabelle ist nicht mglich"
swe "Partitioneringskommando p en opartitionerad tabell r inte mjligt" swe "Partitioneringskommando p en opartitionerad tabell r inte mjligt"
ER_FOREIGN_KEY_ON_PARTITIONED ER_FOREIGN_KEY_ON_PARTITIONED
eng "Foreign key condition is not yet supported in conjunction with partitioning" eng "Foreign key clause is not yet supported in conjunction with partitioning"
ger "Fremdschlssel-Beschrnkungen sind im Zusammenhang mit Partitionierung nicht zulssig" ger "Fremdschlssel-Beschrnkungen sind im Zusammenhang mit Partitionierung nicht zulssig"
swe "Foreign key villkor r inte nnu implementerad i kombination med partitionering" swe "Foreign key klausul r inte nnu implementerad i kombination med partitionering"
ER_DROP_PARTITION_NON_EXISTENT ER_DROP_PARTITION_NON_EXISTENT
eng "Error in list of partitions to %-.64s" eng "Error in list of partitions to %-.64s"
ger "Fehler in der Partitionsliste bei %-.64s" ger "Fehler in der Partitionsliste bei %-.64s"
...@@ -5791,13 +5791,13 @@ ER_COALESCE_ONLY_ON_HASH_PARTITION ...@@ -5791,13 +5791,13 @@ ER_COALESCE_ONLY_ON_HASH_PARTITION
ger "COALESCE PARTITION kann nur auf HASH- oder KEY-Partitionen benutzt werden" ger "COALESCE PARTITION kann nur auf HASH- oder KEY-Partitionen benutzt werden"
swe "COALESCE PARTITION kan bara anvndas p HASH/KEY partitioner" swe "COALESCE PARTITION kan bara anvndas p HASH/KEY partitioner"
ER_REORG_HASH_ONLY_ON_SAME_NO ER_REORG_HASH_ONLY_ON_SAME_NO
eng "REORGANISE PARTITION can only be used to reorganise partitions not to change their numbers" eng "REORGANIZE PARTITION can only be used to reorganize partitions not to change their numbers"
ger "REORGANIZE PARTITION kann nur zur Reorganisation von Partitionen verwendet werden, nicht, um ihre Nummern zu ndern" ger "REORGANIZE PARTITION kann nur zur Reorganisation von Partitionen verwendet werden, nicht, um ihre Nummern zu ndern"
swe "REORGANISE PARTITION kan bara anvndas fr att omorganisera partitioner, inte fr att ndra deras antal" swe "REORGANIZE PARTITION kan bara anvndas fr att omorganisera partitioner, inte fr att ndra deras antal"
ER_REORG_NO_PARAM_ERROR ER_REORG_NO_PARAM_ERROR
eng "REORGANISE PARTITION without parameters can only be used on auto-partitioned tables using HASH PARTITIONs" eng "REORGANIZE PARTITION without parameters can only be used on auto-partitioned tables using HASH PARTITIONs"
ger "REORGANIZE PARTITION ohne Parameter kann nur fr auto-partitionierte Tabellen verwendet werden, die HASH-Partitionierung benutzen" ger "REORGANIZE PARTITION ohne Parameter kann nur fr auto-partitionierte Tabellen verwendet werden, die HASH-Partitionierung benutzen"
swe "REORGANISE PARTITION utan parametrar kan bara anvndas p auto-partitionerade tabeller som anvnder HASH partitionering" swe "REORGANIZE PARTITION utan parametrar kan bara anvndas p auto-partitionerade tabeller som anvnder HASH partitionering"
ER_ONLY_ON_RANGE_LIST_PARTITION ER_ONLY_ON_RANGE_LIST_PARTITION
eng "%-.64s PARTITION can only be used on RANGE/LIST partitions" eng "%-.64s PARTITION can only be used on RANGE/LIST partitions"
ger "%-.64s PARTITION kann nur fr RANGE- oder LIST-Partitionen verwendet werden" ger "%-.64s PARTITION kann nur fr RANGE- oder LIST-Partitionen verwendet werden"
...@@ -5815,7 +5815,7 @@ ER_COALESCE_PARTITION_NO_PARTITION ...@@ -5815,7 +5815,7 @@ ER_COALESCE_PARTITION_NO_PARTITION
ger "Zumindest eine Partition muss mit COALESCE PARTITION zusammengefgt werden" ger "Zumindest eine Partition muss mit COALESCE PARTITION zusammengefgt werden"
swe "tminstone en partition mste sls ihop vid COALESCE PARTITION" swe "tminstone en partition mste sls ihop vid COALESCE PARTITION"
ER_REORG_PARTITION_NOT_EXIST ER_REORG_PARTITION_NOT_EXIST
eng "More partitions to reorganise than there are partitions" eng "More partitions to reorganize than there are partitions"
ger "Es wurde versucht, mehr Partitionen als vorhanden zu reorganisieren" ger "Es wurde versucht, mehr Partitionen als vorhanden zu reorganisieren"
swe "Fler partitioner att reorganisera n det finns partitioner" swe "Fler partitioner att reorganisera n det finns partitioner"
ER_SAME_NAME_PARTITION ER_SAME_NAME_PARTITION
...@@ -5827,7 +5827,7 @@ ER_NO_BINLOG_ERROR ...@@ -5827,7 +5827,7 @@ ER_NO_BINLOG_ERROR
ger "Es es nicht erlaubt, bei diesem Befehl binlog abzuschalten" ger "Es es nicht erlaubt, bei diesem Befehl binlog abzuschalten"
swe "Det r inte tilltet att stnga av binlog p detta kommando" swe "Det r inte tilltet att stnga av binlog p detta kommando"
ER_CONSECUTIVE_REORG_PARTITIONS ER_CONSECUTIVE_REORG_PARTITIONS
eng "When reorganising a set of partitions they must be in consecutive order" eng "When reorganizing a set of partitions they must be in consecutive order"
ger "Bei der Reorganisation eines Satzes von Partitionen mssen diese in geordneter Reihenfolge vorliegen" ger "Bei der Reorganisation eines Satzes von Partitionen mssen diese in geordneter Reihenfolge vorliegen"
swe "Nr ett antal partitioner omorganiseras mste de vara i konsekutiv ordning" swe "Nr ett antal partitioner omorganiseras mste de vara i konsekutiv ordning"
ER_REORG_OUTSIDE_RANGE ER_REORG_OUTSIDE_RANGE
......
...@@ -3321,7 +3321,7 @@ bool mysql_create_table_no_lock(THD *thd, ...@@ -3321,7 +3321,7 @@ bool mysql_create_table_no_lock(THD *thd,
if (key->type == Key::FOREIGN_KEY && if (key->type == Key::FOREIGN_KEY &&
!part_info->is_auto_partitioned) !part_info->is_auto_partitioned)
{ {
my_error(ER_CANNOT_ADD_FOREIGN, MYF(0)); my_error(ER_FOREIGN_KEY_ON_PARTITIONED, MYF(0));
goto err; goto err;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment