|
From: <asf...@us...> - 2015-07-12 21:16:36
|
Revision: 61972
http://sourceforge.net/p/firebird/code/61972
Author: asfernandes
Date: 2015-07-12 21:16:33 +0000 (Sun, 12 Jul 2015)
Log Message:
-----------
Fixed CORE-4279 - Invalid error message: "CHARACTER SET OCTETS is not defined" on db creation with isc_dpb_lc_ctype = OCTETS.
Modified Paths:
--------------
firebird/trunk/lang_helpers/gds_codes.ftn
firebird/trunk/lang_helpers/gds_codes.pas
firebird/trunk/src/include/gen/codetext.h
firebird/trunk/src/include/gen/iberror.h
firebird/trunk/src/include/gen/msgs.h
firebird/trunk/src/include/gen/sql_code.h
firebird/trunk/src/include/gen/sql_state.h
firebird/trunk/src/jrd/jrd.cpp
firebird/trunk/src/msgs/facilities2.sql
firebird/trunk/src/msgs/messages2.sql
firebird/trunk/src/msgs/system_errors2.sql
Modified: firebird/trunk/lang_helpers/gds_codes.ftn
===================================================================
--- firebird/trunk/lang_helpers/gds_codes.ftn 2015-07-12 20:10:49 UTC (rev 61971)
+++ firebird/trunk/lang_helpers/gds_codes.ftn 2015-07-12 21:16:33 UTC (rev 61972)
@@ -1618,6 +1618,8 @@
PARAMETER (GDS__savepoint_backout_err = 335545102)
INTEGER*4 GDS__domain_primary_key_notnull
PARAMETER (GDS__domain_primary_key_notnull = 335545103)
+ INTEGER*4 GDS__invalid_attachment_charset
+ PARAMETER (GDS__invalid_attachment_charset = 335545104)
INTEGER*4 GDS__gfix_db_name
PARAMETER (GDS__gfix_db_name = 335740929)
INTEGER*4 GDS__gfix_invalid_sw
Modified: firebird/trunk/lang_helpers/gds_codes.pas
===================================================================
--- firebird/trunk/lang_helpers/gds_codes.pas 2015-07-12 20:10:49 UTC (rev 61971)
+++ firebird/trunk/lang_helpers/gds_codes.pas 2015-07-12 21:16:33 UTC (rev 61972)
@@ -816,6 +816,7 @@
gds_fun_param_mismatch = 335545101;
gds_savepoint_backout_err = 335545102;
gds_domain_primary_key_notnull = 335545103;
+ gds_invalid_attachment_charset = 335545104;
gds_gfix_db_name = 335740929;
gds_gfix_invalid_sw = 335740930;
gds_gfix_incmp_sw = 335740932;
Modified: firebird/trunk/src/include/gen/codetext.h
===================================================================
--- firebird/trunk/src/include/gen/codetext.h 2015-07-12 20:10:49 UTC (rev 61971)
+++ firebird/trunk/src/include/gen/codetext.h 2015-07-12 21:16:33 UTC (rev 61972)
@@ -805,6 +805,7 @@
{"fun_param_mismatch", 335545101},
{"savepoint_backout_err", 335545102},
{"domain_primary_key_notnull", 335545103},
+ {"invalid_attachment_charset", 335545104},
{"gfix_db_name", 335740929},
{"gfix_invalid_sw", 335740930},
{"gfix_incmp_sw", 335740932},
Modified: firebird/trunk/src/include/gen/iberror.h
===================================================================
--- firebird/trunk/src/include/gen/iberror.h 2015-07-12 20:10:49 UTC (rev 61971)
+++ firebird/trunk/src/include/gen/iberror.h 2015-07-12 21:16:33 UTC (rev 61972)
@@ -839,6 +839,7 @@
const ISC_STATUS isc_fun_param_mismatch = 335545101L;
const ISC_STATUS isc_savepoint_backout_err = 335545102L;
const ISC_STATUS isc_domain_primary_key_notnull = 335545103L;
+const ISC_STATUS isc_invalid_attachment_charset = 335545104L;
const ISC_STATUS isc_gfix_db_name = 335740929L;
const ISC_STATUS isc_gfix_invalid_sw = 335740930L;
const ISC_STATUS isc_gfix_incmp_sw = 335740932L;
@@ -1299,7 +1300,7 @@
const ISC_STATUS isc_trace_switch_param_miss = 337182758L;
const ISC_STATUS isc_trace_param_act_notcompat = 337182759L;
const ISC_STATUS isc_trace_mandatory_switch_miss = 337182760L;
-const ISC_STATUS isc_err_max = 1243;
+const ISC_STATUS isc_err_max = 1244;
#else /* c definitions */
@@ -2108,6 +2109,7 @@
#define isc_fun_param_mismatch 335545101L
#define isc_savepoint_backout_err 335545102L
#define isc_domain_primary_key_notnull 335545103L
+#define isc_invalid_attachment_charset 335545104L
#define isc_gfix_db_name 335740929L
#define isc_gfix_invalid_sw 335740930L
#define isc_gfix_incmp_sw 335740932L
@@ -2568,7 +2570,7 @@
#define isc_trace_switch_param_miss 337182758L
#define isc_trace_param_act_notcompat 337182759L
#define isc_trace_mandatory_switch_miss 337182760L
-#define isc_err_max 1243
+#define isc_err_max 1244
#endif
Modified: firebird/trunk/src/include/gen/msgs.h
===================================================================
--- firebird/trunk/src/include/gen/msgs.h 2015-07-12 20:10:49 UTC (rev 61971)
+++ firebird/trunk/src/include/gen/msgs.h 2015-07-12 21:16:33 UTC (rev 61972)
@@ -808,6 +808,7 @@
{335545101, "Input parameter mismatch for function @1"}, /* fun_param_mismatch */
{335545102, "Error during savepoint backout - transaction invalidated"}, /* savepoint_backout_err */
{335545103, "Domain used in the PRIMARY KEY constraint of table @1 must be NOT NULL"}, /* domain_primary_key_notnull */
+ {335545104, "CHARACTER SET @1 cannot be used as a attachment character set"}, /* invalid_attachment_charset */
{335740929, "data base file name (@1) already given"}, /* gfix_db_name */
{335740930, "invalid switch @1"}, /* gfix_invalid_sw */
{335740932, "incompatible switch combination"}, /* gfix_incmp_sw */
Modified: firebird/trunk/src/include/gen/sql_code.h
===================================================================
--- firebird/trunk/src/include/gen/sql_code.h 2015-07-12 20:10:49 UTC (rev 61971)
+++ firebird/trunk/src/include/gen/sql_code.h 2015-07-12 21:16:33 UTC (rev 61972)
@@ -804,6 +804,7 @@
{335545101, -170}, /* 781 fun_param_mismatch */
{335545102, -901}, /* 782 savepoint_backout_err */
{335545103, -291}, /* 783 domain_primary_key_notnull */
+ {335545104, -204}, /* 784 invalid_attachment_charset */
{335740929, -901}, /* 1 gfix_db_name */
{335740930, -901}, /* 2 gfix_invalid_sw */
{335740932, -901}, /* 4 gfix_incmp_sw */
Modified: firebird/trunk/src/include/gen/sql_state.h
===================================================================
--- firebird/trunk/src/include/gen/sql_state.h 2015-07-12 20:10:49 UTC (rev 61971)
+++ firebird/trunk/src/include/gen/sql_state.h 2015-07-12 21:16:33 UTC (rev 61972)
@@ -804,6 +804,7 @@
{335545101, "07001"}, // 781 fun_param_mismatch
{335545102, "HY000"}, // 782 savepoint_backout_err
{335545103, "42000"}, // 783 domain_primary_key_notnull
+ {335545104, "2C000"}, // 784 invalid_attachment_charset
{335740929, "00000"}, // 1 gfix_db_name
{335740930, "00000"}, // 2 gfix_invalid_sw
{335740932, "00000"}, // 4 gfix_incmp_sw
Modified: firebird/trunk/src/jrd/jrd.cpp
===================================================================
--- firebird/trunk/src/jrd/jrd.cpp 2015-07-12 20:10:49 UTC (rev 61971)
+++ firebird/trunk/src/jrd/jrd.cpp 2015-07-12 21:16:33 UTC (rev 61972)
@@ -5574,13 +5574,18 @@
}
USHORT id;
-
const UCHAR* lc_ctype = reinterpret_cast<const UCHAR*>(options->dpb_lc_ctype.c_str());
if (MET_get_char_coll_subtype(tdbb, &id, lc_ctype, options->dpb_lc_ctype.length()) &&
- INTL_defined_type(tdbb, id & 0xFF) && ((id & 0xFF) != CS_BINARY))
+ INTL_defined_type(tdbb, id & 0xFF))
{
- attachment->att_client_charset = attachment->att_charset = id & 0xFF;
+ if ((id & 0xFF) == CS_BINARY)
+ {
+ ERR_post(Arg::Gds(isc_bad_dpb_content) <<
+ Arg::Gds(isc_invalid_attachment_charset) << Arg::Str(options->dpb_lc_ctype));
+ }
+ else
+ attachment->att_client_charset = attachment->att_charset = id & 0xFF;
}
else
{
Modified: firebird/trunk/src/msgs/facilities2.sql
===================================================================
--- firebird/trunk/src/msgs/facilities2.sql 2015-07-12 20:10:49 UTC (rev 61971)
+++ firebird/trunk/src/msgs/facilities2.sql 2015-07-12 21:16:33 UTC (rev 61972)
@@ -1,7 +1,7 @@
/* MAX_NUMBER is the next number to be used, always one more than the highest message number. */
set bulk_insert INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES (?, ?, ?, ?);
--
-('2015-04-13 14:50:00', 'JRD', 0, 784)
+('2015-07-12 18:05:00', 'JRD', 0, 785)
('2015-03-17 18:33:00', 'QLI', 1, 533)
('2015-01-07 18:01:51', 'GFIX', 3, 134)
('1996-11-07 13:39:40', 'GPRE', 4, 1)
Modified: firebird/trunk/src/msgs/messages2.sql
===================================================================
--- firebird/trunk/src/msgs/messages2.sql 2015-07-12 20:10:49 UTC (rev 61971)
+++ firebird/trunk/src/msgs/messages2.sql 2015-07-12 21:16:33 UTC (rev 61972)
@@ -891,6 +891,7 @@
('fun_param_mismatch', 'UdfCallNode::dsqlPass', 'ExprNode.cpp', NULL, 0, 781, NULL, 'Input parameter mismatch for function @1', NULL, NULL);
('savepoint_backout_err', 'VIO_verb_cleanup', 'vio.cpp', NULL, 0, 782, NULL, 'Error during savepoint backout - transaction invalidated', NULL, NULL);
('domain_primary_key_notnull', NULL, 'DdlNodes.epp', NULL, 0, 783, NULL, 'Domain used in the PRIMARY KEY constraint of table @1 must be NOT NULL', NULL, NULL);
+('invalid_attachment_charset', NULL, NULL, NULL, 0, 784, NULL, 'CHARACTER SET @1 cannot be used as a attachment character set', NULL, NULL);
-- QLI
(NULL, NULL, NULL, NULL, 1, 0, NULL, 'expected type', NULL, NULL);
(NULL, NULL, NULL, NULL, 1, 1, NULL, 'bad block type', NULL, NULL);
Modified: firebird/trunk/src/msgs/system_errors2.sql
===================================================================
--- firebird/trunk/src/msgs/system_errors2.sql 2015-07-12 20:10:49 UTC (rev 61971)
+++ firebird/trunk/src/msgs/system_errors2.sql 2015-07-12 21:16:33 UTC (rev 61972)
@@ -790,6 +790,7 @@
(-170, '07', '001', 0, 781, 'fun_param_mismatch', NULL, NULL)
(-901, 'HY', '000', 0, 782, 'savepoint_backout_err', NULL, NULL)
(-291, '42', '000', 0, 783, 'domain_primary_key_notnull', NULL, NULL)
+(-204, '2C', '000', 0, 784, 'invalid_attachment_charset', NULL, NULL)
-- GFIX
(-901, '00', '000', 3, 1, 'gfix_db_name', NULL, NULL)
(-901, '00', '000', 3, 2, 'gfix_invalid_sw', NULL, NULL)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|