mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 08:03:04 +01:00
Update isql accordingly to my previous Fix SF Bug #1292007
Move more hardcoded error strings to the msg database.
This commit is contained in:
parent
a3f622a2df
commit
4337f38101
@ -970,7 +970,7 @@ void ISQL_errmsg(const ISC_STATUS* status)
|
||||
}
|
||||
if (Input_file)
|
||||
{
|
||||
const char* s = 0;
|
||||
//const char* s = 0;
|
||||
int linenum = -1;
|
||||
if (status[0] == isc_arg_gds && status[1] == isc_dsql_error
|
||||
&& status[2] == isc_arg_gds && status[3] == isc_sqlerr
|
||||
@ -982,11 +982,15 @@ void ISQL_errmsg(const ISC_STATUS* status)
|
||||
case isc_dsql_procedure_err:
|
||||
case isc_dsql_relation_err:
|
||||
case isc_dsql_procedure_use_err:
|
||||
if (vec[-2] == isc_arg_string)
|
||||
{
|
||||
s = (char*) vec[-1];
|
||||
//STDERROUT(s);
|
||||
}
|
||||
case isc_dsql_no_dup_name:
|
||||
vec = &status[8];
|
||||
while (*vec++ != isc_arg_end)
|
||||
if (vec[0] == isc_dsql_line_col_error && vec[1] == isc_arg_number)
|
||||
{
|
||||
linenum = vec[2];
|
||||
//STDERROUT(s);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case isc_dsql_token_unk_err:
|
||||
if (status[8] == isc_arg_number)
|
||||
@ -998,6 +1002,7 @@ void ISQL_errmsg(const ISC_STATUS* status)
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* CVC: Obsolete on 2005.10.06 because now line & column are numeric arguments.
|
||||
if (s)
|
||||
{
|
||||
while (*s && !isdigit(*s))
|
||||
@ -1009,13 +1014,15 @@ void ISQL_errmsg(const ISC_STATUS* status)
|
||||
linenum = linenum * 10 + *s - '0';
|
||||
}
|
||||
}
|
||||
*/
|
||||
if (linenum != -1)
|
||||
{
|
||||
linenum += Ifp.indev_line;
|
||||
sprintf(errbuf, "At line %d in file %s", linenum, Ifp.indev_fn);
|
||||
ISQL_msg_get(EXACTLINE, errbuf, (TEXT*)(IPTR) linenum, Ifp.indev_fn);
|
||||
}
|
||||
else
|
||||
sprintf(errbuf, "After line %d in file %s", Ifp.indev_line, Ifp.indev_fn);
|
||||
ISQL_msg_get(AFTERLINE, errbuf, (TEXT*)(IPTR) Ifp.indev_line, Ifp.indev_fn);
|
||||
|
||||
STDERROUT(errbuf);
|
||||
}
|
||||
}
|
||||
|
@ -202,13 +202,13 @@ const int NO_TRIGGERS_ON_REL = 89; // There are no triggers on table %s in thi
|
||||
const int NO_REL_OR_TRIGGER = 90; // There is no table or trigger %s in this database
|
||||
const int NO_TRIGGERS = 91; // There are no triggers in this database
|
||||
const int NO_CHECKS_ON_REL = 92; // There are no check constraints on table %s in this database
|
||||
const int NO_COMMENTS = 115; // There are no comments for objects in this database.
|
||||
const int NO_COMMENTS = 115; // There are no comments for objects in this database.
|
||||
const int BUFFER_OVERFLOW = 94; // An isql command exceeded maximum buffer size
|
||||
#ifdef SCROLLABLE_CURSORS
|
||||
const int HLP_SETFETCH = 95; // \tSET AUTOfetch -- toggle autofetch of records\n
|
||||
#endif
|
||||
|
||||
const int NO_ROLES = 95; // There are no roles in this database
|
||||
const int NO_ROLES = 95; // There are no roles in this database
|
||||
const int NO_REL_OR_PROC_OR_ROLE = 96; // There is no table, stored procedure, or
|
||||
// role %s in this database
|
||||
const int NO_GRANT_ON_ROL = 97; // There is no membership privilege granted
|
||||
@ -216,7 +216,7 @@ const int NO_GRANT_ON_ROL = 97; // There is no membership privilege granted
|
||||
const int UNEXPECTED_EOF = 98; // Expected end of statement, encountered EOF
|
||||
const int TIME_ERR = 101; // Bad TIME: %s\n
|
||||
const int HLP_OBJTYPE3 = 102; // Some more objects
|
||||
const int NO_ROLE = 103;
|
||||
const int NO_ROLE = 103; // There is no role %s in this database
|
||||
const int USAGE4 = 104; // Usage message 4
|
||||
const int INCOMPLETE_STR = 105; // Incomplete string in %s
|
||||
const int HLP_SETSQLDIALECT = 106; // \tSET SQL DIALECT <n> -- set sql dialect to <n>
|
||||
@ -225,12 +225,14 @@ const int HLP_SETPLANONLY = 108; // toggle display of query plan without exec
|
||||
const int HLP_SETHEADING = 109; // toggle display of query column titles
|
||||
const int HLP_SETBAIL = 110; // toggle bailing out on errors in non-interactive mode
|
||||
const int USAGE3 = 111; // Usage message 3
|
||||
const int TIME_PROMPT = 112; // Enter %s as H:M:S>
|
||||
const int TIMESTAMP_PROMPT = 113; // Enter %s as Y/MON/D H:MIN:S[.MSEC]>
|
||||
const int TIME_PROMPT = 112; // Enter %s as H:M:S>
|
||||
const int TIMESTAMP_PROMPT = 113; // Enter %s as Y/MON/D H:MIN:S[.MSEC]>
|
||||
const int TIMESTAMP_ERR = 114; // Bad TIMESTAMP: %s\n
|
||||
const int ONLY_FIRST_BLOBS = 116; // Printing only the first %d blobs.
|
||||
const int MSG_TABLES = 117; // Tables:
|
||||
const int MSG_FUNCTIONS = 118; // Functions:
|
||||
const int ONLY_FIRST_BLOBS = 116; // Printing only the first %d blobs.
|
||||
const int MSG_TABLES = 117; // Tables:
|
||||
const int MSG_FUNCTIONS = 118; // Functions:
|
||||
const int EXACTLINE = 119; // At line %d in file %s
|
||||
const int AFTERLINE = 120; // After line %d in file %s
|
||||
|
||||
// Initialize types
|
||||
|
||||
|
@ -22,7 +22,7 @@ INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES ('20
|
||||
/*
|
||||
INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES ('1996-11-07 13:38:43', 'GJRN', 16, 241);
|
||||
*/
|
||||
INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES ('2005-05-25 21:31:22', 'ISQL', 17, 119);
|
||||
INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES ('2005-10-05 02:16:58', 'ISQL', 17, 121);
|
||||
INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES ('1998-11-04 11:06:15', 'GSEC', 18, 91);
|
||||
INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES ('2002-03-05 02:30:12', 'LICENSE', 19, 60);
|
||||
INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES ('2002-03-05 02:31:54', 'DOS', 20, 74);
|
||||
|
@ -1130,6 +1130,10 @@ INSERT INTO HISTORY (CHANGE_NUMBER, CHANGE_WHO, CHANGE_DATE, FAC_CODE, NUMBER, O
|
||||
INSERT INTO HISTORY (CHANGE_NUMBER, CHANGE_WHO, CHANGE_DATE, FAC_CODE, NUMBER, OLD_TEXT, OLD_ACTION, OLD_EXPLANATION, LOCALE) VALUES (1137, 'cvc', '2005-09-10 00:28:08', 13, 760, 'Illegal attempt to attach to an uninitialized WAL segment for %s', NULL, NULL, 'c_pg');
|
||||
INSERT INTO HISTORY (CHANGE_NUMBER, CHANGE_WHO, CHANGE_DATE, FAC_CODE, NUMBER, OLD_TEXT, OLD_ACTION, OLD_EXPLANATION, LOCALE) VALUES (1138, 'cvc', '2005-09-10 00:21:09', 13, 759, 'Invalid WAL parameter block option %s', NULL, NULL, 'c_pg');
|
||||
INSERT INTO HISTORY (CHANGE_NUMBER, CHANGE_WHO, CHANGE_DATE, FAC_CODE, NUMBER, OLD_TEXT, OLD_ACTION, OLD_EXPLANATION, LOCALE) VALUES (1139, 'alexpeshkoff', '2005-09-30 11:49:49', 18, 87, '-server <server to manage>', NULL, NULL, 'c_pg');
|
||||
INSERT INTO HISTORY (CHANGE_NUMBER, CHANGE_WHO, CHANGE_DATE, FAC_CODE, NUMBER, OLD_TEXT, OLD_ACTION, OLD_EXPLANATION, LOCALE) VALUES (1140, 'cvc', '2005-10-05 03:07:00', 13, 756, 'WAL subsystem encountered error', NULL, NULL, 'c_pg');
|
||||
INSERT INTO HISTORY (CHANGE_NUMBER, CHANGE_WHO, CHANGE_DATE, FAC_CODE, NUMBER, OLD_TEXT, OLD_ACTION, OLD_EXPLANATION, LOCALE) VALUES (1141, 'cvc', '2005-10-05 03:08:08', 13, 755, 'WAL subsystem corrupted', NULL, NULL, 'c_pg');
|
||||
INSERT INTO HISTORY (CHANGE_NUMBER, CHANGE_WHO, CHANGE_DATE, FAC_CODE, NUMBER, OLD_TEXT, OLD_ACTION, OLD_EXPLANATION, LOCALE) VALUES (1142, 'cvc', '2005-10-05 03:09:24', 13, 754, 'Database %s: WAL subsystem bug for pid %d\\n%s', NULL, NULL, 'c_pg');
|
||||
INSERT INTO HISTORY (CHANGE_NUMBER, CHANGE_WHO, CHANGE_DATE, FAC_CODE, NUMBER, OLD_TEXT, OLD_ACTION, OLD_EXPLANATION, LOCALE) VALUES (1143, 'cvc', '2005-10-05 03:10:53', 13, 753, 'Could not expand the WAL segment for database %s', NULL, NULL, 'c_pg');
|
||||
|
||||
COMMIT WORK;
|
||||
|
||||
|
@ -2982,6 +2982,8 @@ INSERT INTO MESSAGES (SYMBOL, ROUTINE, MODULE, TRANS_NOTES, FAC_CODE, NUMBER, FL
|
||||
INSERT INTO MESSAGES (SYMBOL, ROUTINE, MODULE, TRANS_NOTES, FAC_CODE, NUMBER, FLAGS, TEXT, "ACTION", EXPLANATION) VALUES (NULL, 'parse_sql_dtype', 'parse.cpp', NULL, 1, 510, NULL, 'Field scale exceeds allowed range', NULL, NULL);
|
||||
INSERT INTO MESSAGES (SYMBOL, ROUTINE, MODULE, TRANS_NOTES, FAC_CODE, NUMBER, FLAGS, TEXT, "ACTION", EXPLANATION) VALUES (NULL, 'parse_sql_dtype', 'parse.cpp', NULL, 1, 511, NULL, 'Field length exceeds allowed range', NULL, NULL);
|
||||
INSERT INTO MESSAGES (SYMBOL, ROUTINE, MODULE, TRANS_NOTES, FAC_CODE, NUMBER, FLAGS, TEXT, "ACTION", EXPLANATION) VALUES (NULL, 'parse_sql_dtype', 'parse.cpp', NULL, 1, 512, NULL, 'Field length should be greater than zero', NULL, NULL);
|
||||
INSERT INTO MESSAGES (SYMBOL, ROUTINE, MODULE, TRANS_NOTES, FAC_CODE, NUMBER, FLAGS, TEXT, "ACTION", EXPLANATION) VALUES (NULL, 'ISQL_errmsg', 'isql.epp', NULL, 17, 119, NULL, 'At line %d in file %s', NULL, NULL);
|
||||
INSERT INTO MESSAGES (SYMBOL, ROUTINE, MODULE, TRANS_NOTES, FAC_CODE, NUMBER, FLAGS, TEXT, "ACTION", EXPLANATION) VALUES (NULL, 'ISQL_errmsg', 'isql.epp', NULL, 17, 120, NULL, 'After line %d in file %s', NULL, NULL);
|
||||
|
||||
COMMIT WORK;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user