You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

395 lines
23 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. #if MYSQL_6_10
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Text;
  5. namespace Externals.MySql.Data
  6. {
  7. internal static class Resources
  8. {
  9. public static string[] Keywords
  10. {
  11. get
  12. {
  13. return new string[] {
  14. "ACCESSIBLE", "ADD", "ALL", "ALTER", "ANALYZE", "AND", "AS", "ASC", "ASENSITIVE",
  15. "BEFORE", "BEGIN", "BETWEEN", "BIGINT", "BINARY", "BLOB", "BOTH", "BY", "CALL",
  16. "CASCADE", "CASE", "CHANGE", "CHAR", "CHARACTER", "CHECK", "COLLATE", "COLUMN",
  17. "COMMIT", "CONDITION", "CONNECTION", "CONSTRAINT", "CONTINUE", "CONVERT", "CREATE",
  18. "CROSS", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER",
  19. "CURSOR", "DATABASE", "DATABASES", "DAY_HOUR", "DAY_MICROSECOND", "DAY_MINUTE",
  20. "DAY_SECOND", "DEC", "DECIMAL", "DECLARE", "DEFAULT", "DELAYED", "DELETE", "DESC",
  21. "DESCRIBE", "DETERMINISTIC", "DISTINCT", "DISTINCTROW", "DIV", "DO", "DOUBLE",
  22. "DROP", "DUAL", "EACH", "ELSE", "ELSEIF", "ENCLOSED", "END", "ESCAPED", "EXISTS",
  23. "EXIT", "EXPLAIN", "FALSE", "FETCH", "FLOAT", "FLOAT4", "FLOAT8", "FOR", "FORCE",
  24. "FOREIGN", "FROM", "FULLTEXT", "GOTO", "GRANT", "GROUP", "HAVING", "HIGH_PRIORITY",
  25. "HOUR_MICROSECOND", "HOUR_MINUTE", "HOUR_SECOND", "IF", "IGNORE", "IN", "INDEX",
  26. "INFILE", "INNER", "INOUT", "INSENSITIVE", "INSERT", "INT", "INT1", "INT2", "INT3",
  27. "INT4", "INT8", "INTEGER", "INTERVAL", "INTO", "IS", "ITERATE", "JOIN", "KEY",
  28. "KEYS", "KILL", "LABEL", "LEADING", "LEAVE", "LEFT", "LIKE", "LIMIT", "LINEAR",
  29. "LINES", "LOAD", "LOCALTIME", "LOCALTIMESTAMP", "LOCK", "LONG", "LONGBLOB",
  30. "LONGTEXT", "LOOP", "LOW_PRIORITY", "MASTER_SSL_VERIFY_SERVER_CERT", "MATCH",
  31. "MEDIUMBLOB", "MEDIUMINT", "MEDIUMTEXT", "MIDDLEINT", "MINUTE_MICROSECOND",
  32. "MINUTE_SECOND", "MOD", "MODIFIES", "NATURAL", "NOT", "NO_WRITE_TO_BINLOG", "NULL",
  33. "NUMERIC", "ON", "OPTIMIZE", "OPTION", "OPTIONALLY", "OR", "ORDER", "OUT", "OUTER",
  34. "OUTFILE", "PRECISION", "PRIMARY", "PROCEDURE", "PURGE", "RANGE", "READ", "READS",
  35. "READ_ONLY", "READ_WRITE", "REAL", "REFERENCES", "REGEXP", "RELEASE", "RENAME",
  36. "REPEAT", "REPLACE", "REQUIRE", "RESTRICT", "RETURN", "REVOKE", "RIGHT", "RLIKE",
  37. "ROLLBACK", "SCHEMA", "SCHEMAS", "SECOND_MICROSECOND", "SELECT", "SENSITIVE",
  38. "SEPARATOR", "SET", "SHOW", "SHUTDOWN", "SMALLINT", "SPATIAL", "SPECIFIC", "SQL",
  39. "SQLEXCEPTION", "SQLSTATE", "SQLWARNING", "SQL_BIG_RESULT", "SQL_CALC_FOUND_ROWS",
  40. "SQL_SMALL_RESULT", "SSL", "STARTING", "STRAIGHT_JOIN", "TABLE", "TERMINATED",
  41. "THEN", "TINYBLOB", "TINYINT", "TINYTEXT", "TO", "TRAILING", "TRIGGER", "TRUE",
  42. "UNDO", "UNION", "UNIQUE", "UNLOCK", "UNSIGNED", "UPDATE", "UPGRADE", "USAGE",
  43. "USE", "USING", "UTC_DATE", "UTC_TIME", "UTC_TIMESTAMP", "VALUE", "VALUES",
  44. "VARBINARY", "VARCHAR", "VARCHARACTER", "VARYING", "WHEN", "WHERE", "WHILE", "WITH",
  45. "WRITE", "XOR", "YEAR_MONTH", "ZEROFILL"
  46. };
  47. }
  48. }
  49. public static string[] ReservedWords
  50. {
  51. get
  52. {
  53. return new string[] {
  54. "ACCESSIBLE", "ADD", "ALL", "ALTER", "ANALYZE", "AND",
  55. "AS", "ASC", "ASENSITIVE", "BEFORE", "BETWEEN", "BIGINT",
  56. "BINARY", "BLOB", "BOTH", "BY", "CALL", "CASCADE",
  57. "CASE", "CHANGE", "CHAR", "CHARACTER", "CHECK", "COLLATE",
  58. "COLUMN", "CONDITION", "CONNECTION", "CONSTRAINT", "CONTINUE", "CONTRIBUTORS",
  59. "CONVERT", "CREATE", "CROSS", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP",
  60. "CURRENT_USER", "CURSOR", "DATABASE", "DATABASES", "DAY_HOUR", "DAY_MICROSECOND",
  61. "DAY_MINUTE", "DAY_SECOND", "DEC", "DECIMAL", "DECLARE", "DEFAULT",
  62. "DELAYED", "DELETE", "DESC", "DESCRIBE", "DETERMINISTIC", "DISTINCT",
  63. "DISTINCTROW", "DIV", "DOUBLE", "DROP", "DUAL", "EACH",
  64. "ELSE", "ELSEIF", "ENCLOSED", "ESCAPED", "EXISTS", "EXIT",
  65. "EXPLAIN", "FALSE", "FETCH", "FLOAT", "FLOAT4", "FLOAT8",
  66. "FOR", "FORCE", "FOREIGN", "FROM", "FULLTEXT", "GRANT",
  67. "GROUP", "HAVING", "HIGH_PRIORITY", "HOUR_MICROSECOND", "HOUR_MINUTE", "HOUR_SECOND",
  68. "IF", "IGNORE", "IN", "INDEX", "INFILE", "INNER",
  69. "INOUT", "INSENSITIVE", "INSERT", "INT", "INT1", "INT2",
  70. "INT3", "INT4", "INT8", "INTEGER", "INTERVAL", "INTO",
  71. "IS", "ITERATE", "JOIN", "KEY", "KEYS", "KILL",
  72. "LEADING", "LEAVE", "LEFT", "LIKE", "LIMIT", "LINEAR",
  73. "LINES", "LOAD", "LOCALTIME", "LOCALTIMESTAMP", "LOCK", "LONG",
  74. "LONGBLOB", "LONGTEXT", "LOOP", "LOW_PRIORITY", "MATCH", "MEDIUMBLOB",
  75. "MEDIUMINT", "MEDIUMTEXT", "MIDDLEINT", "MINUTE_MICROSECOND", "MINUTE_SECOND", "MOD",
  76. "MODIFIES", "NATURAL", "NOT", "NO_WRITE_TO_BINLOG", "NULL", "NUMERIC",
  77. "ON", "OPTIMIZE", "OPTION", "OPTIONALLY", "OR", "ORDER",
  78. "OUT", "OUTER", "OUTFILE", "PRECISION", "PRIMARY", "PROCEDURE",
  79. "PURGE", "RANGE", "READ", "READS", "READ_ONLY", "READ_WRITE",
  80. "REAL", "REFERENCES", "REGEXP", "RELEASE", "RENAME", "REPEAT",
  81. "REPLACE", "REQUIRE", "RESTRICT", "RETURN", "REVOKE", "RIGHT",
  82. "RLIKE", "SCHEMA", "SCHEMAS", "SECOND_MICROSECOND", "SELECT", "SENSITIVE",
  83. "SEPARATOR", "SET", "SHOW", "SMALLINT", "SPATIAL", "SPECIFIC",
  84. "SQL", "SQLEXCEPTION", "SQLSTATE", "SQLWARNING", "SQL_BIG_RESULT", "SQL_CALC_FOUND_ROWS",
  85. "SQL_SMALL_RESULT", "SSL", "STARTING", "STRAIGHT_JOIN", "TABLE", "TERMINATED",
  86. "THEN", "TINYBLOB", "TINYINT", "TINYTEXT", "TO", "TRAILING",
  87. "TRIGGER", "TRUE", "UNDO", "UNION", "UNIQUE", "UNLOCK",
  88. "UNSIGNED", "UPDATE", "UPGRADE", "USAGE", "USE", "USING",
  89. "UTC_DATE", "UTC_TIME", "UTC_TIMESTAMP", "VALUES", "VARBINARY", "VARCHAR",
  90. "VARCHARACTER", "VARYING", "WHEN", "WHERE", "WHILE", "WITH",
  91. "WRITE", "X509", "XOR", "YEAR_MONTH", "ZEROFILL"
  92. };
  93. }
  94. }
  95. public const string BadVersionFormat = "Version string not in acceptable format";
  96. public const string NamedPipeNoSeek = "NamedPipeStream does not support seeking";
  97. public const string StreamAlreadyClosed = "The stream has already been closed";
  98. public const string BufferCannotBeNull = " The buffer cannot be null";
  99. public const string BufferNotLargeEnough = " Buffer is not large enough";
  100. public const string OffsetCannotBeNegative = " Offset cannot be negative";
  101. public const string CountCannotBeNegative = " Count cannot be negative";
  102. public const string StreamNoRead = " The stream does not support reading";
  103. public const string NamedPipeNoSetLength = "NamedPipeStream doesn't support SetLength";
  104. public const string StreamNoWrite = "The stream does not support writing";
  105. public const string ErrorCreatingSocket = "Error creating socket connection";
  106. public const string SocketNoSeek = "Socket streams do not support seeking";
  107. public const string UnixSocketsNotSupported = "Unix sockets are not supported on Windows";
  108. public const string OffsetMustBeValid = "Offset must be a valid position in buffer";
  109. public const string CSNoSetLength = "SetLength is not a valid operation on CompressedStream";
  110. public const string FromIndexMustBeValid = "From index must be a valid index inside the from buffer";
  111. public const string FromAndLengthTooBig = "From index and length use more bytes than from contains";
  112. public const string IndexMustBeValid = "Index must be a valid position in the buffer";
  113. public const string IndexAndLengthTooBig = "Index and length use more bytes than to has room for";
  114. public const string PasswordMustHaveLegalChars = "Password must be valid and contain length characters";
  115. public const string ParameterCannotBeNegative = "Parameter cannot have a negative value";
  116. public const string ConnectionMustBeOpen = "Connection must be valid and open";
  117. public const string DataReaderOpen = "There is already an open DataReader associated with this Connection which must be closed first.";
  118. public const string SPNotSupported = "Stored procedures are not supported on this version of MySQL";
  119. public const string ConnectionNotSet = "The connection property has not been set or is null.";
  120. public const string ConnectionNotOpen = "The connection is not open.";
  121. public const string AdapterIsNull = "Improper MySqlCommandBuilder state: adapter is null";
  122. public const string AdapterSelectIsNull = "Improper MySqlCommandBuilder state: adapter's SelectCommand is null";
  123. public const string CBMultiTableNotSupported = "MySqlCommandBuilder does not support multi-table statements";
  124. public const string CBNoKeyColumn = "MySqlCommandBuilder cannot operate on tables with no unique or key columns";
  125. public const string ParameterCannotBeNull = "Parameter cannot be null";
  126. public const string ChaosNotSupported = "Chaos isolation level is not supported ";
  127. public const string ParameterIsInvalid = "Parameter is invalid.";
  128. public const string ConnectionAlreadyOpen = "The connection is already open.";
  129. public const string KeywordNotSupported = "Option not supported.";
  130. public const string WriteToStreamFailed = "Writing to the stream failed.";
  131. public const string ReadFromStreamFailed = "Reading from the stream has failed.";
  132. public const string QueryTooLarge = "Packets larger than max_allowed_packet are not allowed.";
  133. public const string UnableToExecuteSP = "Unable to execute stored procedure '{0}'.";
  134. public const string ProcAndFuncSameName = "same name are not supported.";
  135. public const string KeywordNoNull = "Keyword does not allow null values.";
  136. public const string ImproperValueFormat = "Value has an unsupported format.";
  137. public const string InvalidProcName = "Procedure or function '{0}' cannot be found in database '{1}'.";
  138. public const string HardProcQuery = "Retrieving procedure metadata for {0} from server.";
  139. public const string SoftProcQuery = "Retrieving procedure metadata for {0} from procedure cache.";
  140. public const string ConnectionBroken = "Connection unexpectedly terminated.";
  141. public const string IncorrectTransmission = "An incorrect response was received from the server.";
  142. public const string CancelNotSupported = "Canceling an active query is only supported on MySQL 5.0.0 and above. ";
  143. public const string Timeout = "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.";
  144. public const string CancelNeeds50 = "Canceling an executing query requires MySQL 5.0 or higher.";
  145. public const string NoNestedTransactions = "Nested transactions are not supported.";
  146. public const string CommandTextNotInitialized = "The CommandText property has not been properly initialized.";
  147. public const string UnableToParseFK = "There was an error parsing the foreign key definition.";
  148. public const string PerfMonCategoryHelp = "This category includes a series of counters for MySQL";
  149. public const string PerfMonCategoryName = ".NET Data Provider for MySQL";
  150. public const string PerfMonHardProcHelp = "The number of times a procedures metadata had to be queried from the server.";
  151. public const string PerfMonHardProcName = "Hard Procedure Queries";
  152. public const string PerfMonSoftProcHelp = "The number of times a procedures metadata was retrieved from the client-side cache.";
  153. public const string PerfMonSoftProcName = "Soft Procedure Queries";
  154. public const string WrongParameterName = "Parameter '{0}' is not found but a parameter with the name '{1}' is found. Parameter names must include the leading parameter marker.";
  155. public const string UnableToConnectToHost = "Unable to connect to any of the specified MySQL hosts.";
  156. public const string UnableToRetrieveParameters = "Unable to retrieve stored procedure metadata for routine '{0}'. Either grant SELECT privilege to mysql.proc for this user or use \"check parameters = false\" with your connection string.";
  157. public const string NextResultIsClosed = "Invalid attempt to call NextResult when the reader is closed.";
  158. public const string NoBodiesAndTypeNotSet = "When calling stored procedures and 'Use Procedure Bodies' is false, all parameters must have their type explicitly set.";
  159. public const string TimeoutGettingConnection = "error connecting: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.";
  160. public const string ParameterAlreadyDefined = "Parameter '{0}' has already been defined.";
  161. public const string ParameterMustBeDefined = "Parameter '{0}' must be defined.";
  162. public const string ObjectDisposed = "The object is not open or has been disposed.";
  163. public const string MultipleConnectionsInTransactionNotSupported = "Multiple simultaneous connections or connections with different connection strings inside the same transaction are not currently supported.";
  164. public const string DistributedTxnNotSupported = "MySQL Connector/Net does not currently support distributed transactions.";
  165. public const string FatalErrorDuringExecute = "Fatal error encountered during command execution.";
  166. public const string FatalErrorDuringRead = "Fatal error encountered during data read.";
  167. public const string FatalErrorReadingResult = "Fatal error encountered attempting to read the resultset.";
  168. public const string RoutineNotFound = "Routine '{0}' cannot be found. Either check the spelling or make sure you have sufficient rights to execute the routine.";
  169. public const string ParameterNotFoundDuringPrepare = "Parameter '{0}' was not found during prepare.";
  170. public const string ValueNotSupportedForGuid = "The requested column value could not be treated as or conveted to a Guid.";
  171. public const string UnableToDeriveParameters = "Unable to derive stored routine parameters. The 'Parameters' information schema table is not available and access to the stored procedure body has been disabled.";
  172. public const string DefaultEncodingNotFound = "The default connection encoding was not found. Please report this as a bug along with your connection string and system details.";
  173. public const string GetHostEntryFailed = "Call to GetHostEntry failed after {0} while querying for hostname '{1}': SocketErrorCode={2}, ErrorCode={3}, NativeErrorCode={4}.";
  174. public const string UnableToEnumerateUDF = "An error occured attempting to enumerate the user-defined functions. Do you have SELECT privileges on the mysql.func table?";
  175. public const string DataNotInSupportedFormat = "The given value was not in a supported format.";
  176. public const string NoServerSSLSupport = "The host {0} does not support SSL connections.";
  177. public const string CouldNotFindColumnName = "Could not find specified column in results: {0}";
  178. public const string InvalidColumnOrdinal = "You have specified an invalid column ordinal.";
  179. public const string ReadingPriorColumnUsingSeqAccess = "Invalid attempt to read a prior column using SequentialAccess";
  180. public const string AttemptToAccessBeforeRead = "Invalid attempt to access a field before calling Read()";
  181. public const string UnableToStartSecondAsyncOp = "Unable to start a second async operation while one is running.";
  182. public const string MoreThanOneOPRow = "INTERNAL ERROR: More than one output parameter row detected.";
  183. public const string InvalidValueForBoolean = "'{0}' is an illegal value for a boolean option.";
  184. public const string ServerTooOld = "Connector/Net no longer supports server versions prior to 5.0";
  185. public const string InvalidConnectionStringValue = "The requested value '{0}' is invalid for the given keyword '{1}'.";
  186. public const string TraceCloseConnection = "{0}: Connection Closed";
  187. public const string TraceOpenConnection = "{0}: Connection Opened: connection string = '{1}'";
  188. public const string TraceQueryOpened = "{0}: Query Opened: {2}";
  189. public const string TraceResult = "{0}: Resultset Opened: field(s) = {1}, affected rows = {2}, inserted id = {3}";
  190. public const string TraceQueryDone = "{0}: Query Closed";
  191. public const string TraceSetDatabase = "{0}: Set Database: {1}";
  192. public const string TraceUAWarningBadIndex = "{0}: Usage Advisor Warning: Query is using a bad index";
  193. public const string TraceUAWarningNoIndex = "{0}: Usage Advisor Warning: Query does not use an index";
  194. public const string TraceResultClosed = "{0}: Resultset Closed. Total rows={1}, skipped rows={2}, size (bytes)={3}";
  195. public const string TraceUAWarningSkippedRows = "{0}: Usage Advisor Warning: Skipped {2} rows. Consider a more focused query.";
  196. public const string TraceUAWarningSkippedColumns = "{0}: Usage Advisor Warning: The following columns were not accessed: {2}";
  197. public const string TraceUAWarningFieldConversion = "{0}: Usage Advisor Warning: The field '{2}' was converted to the following types: {3}";
  198. public const string TraceOpenResultError = "{0}: Error encountered attempting to open result: Number={1}, Message={2}";
  199. public const string TraceFetchError = "{0}: Error encountered during row fetch. Number = {1}, Message={2}";
  200. public const string TraceWarning = "{0}: MySql Warning: Level={1}, Code={2}, Message={3}";
  201. public const string TraceErrorMoreThanMaxValueConnections = "Unable to trace. There are more than Int32.MaxValue connections in use.";
  202. public const string TraceStatementPrepared = "{0}: Statement prepared: sql='{1}', statement id={2}";
  203. public const string TraceStatementClosed = "{0}: Statement closed: statement id = {1}";
  204. public const string TraceStatementExecuted = "{0}: Statement executed: statement id = {1}";
  205. public const string UnableToEnableQueryAnalysis = "Unable to enable query analysis. Be sure the Externals.MySql.Data.EMTrace assembly is properly located and registered.";
  206. public const string TraceQueryNormalized = "{0}: Query Normalized: {2}";
  207. public const string NoWindowsIdentity = "Cannot retrieve Windows identity for current user. Connections that use IntegratedSecurity cannot be pooled. Use either 'ConnectionReset=true' or 'Pooling=false' in the connection string to fix.";
  208. public const string RoutineRequiresReturnParameter = "Attempt to call stored function '{0}' without specifying a return parameter";
  209. public const string CanNotDeriveParametersForTextCommands = "Parameters can only be derived for commands using the StoredProcedure command type.";
  210. public const string ReplicatedConnectionsAllowOnlyReadonlyStatements = "Replicated connections allow only readonly statements.";
  211. public const string FileBasedCertificateNotSupported = "File based certificates are only supported when connecting to MySQL Server 5.1 or greater.";
  212. public const string SnapshotNotSupported = "Snapshot isolation level is not supported.";
  213. public const string TypeIsNotExceptionInterceptor = "Type '{0}' is not derived from BaseExceptionInterceptor";
  214. public const string TypeIsNotCommandInterceptor = "Type '{0}' is not derived from BaseCommandInterceptor";
  215. public const string UnknownAuthenticationMethod = "Unknown authentication method '{0}' was requested.";
  216. public const string AuthenticationFailed = "Authentication to host '{0}' for user '{1}' using method '{2}' failed with message: {3}";
  217. public const string WinAuthNotSupportOnPlatform = "Windows authentication connections are not supported on {0}";
  218. public const string AuthenticationMethodNotSupported = "Authentication method '{0}' not supported by any of the available plugins.";
  219. public const string UnableToCreateAuthPlugin = "Unable to create plugin for authentication method '{0}'. Please see inner exception for details.";
  220. public const string MixedParameterNamingNotAllowed = "Mixing named and unnamed parameters is not allowed.";
  221. public const string ParameterIndexNotFound = "Parameter index was not found in Parameter Collection.";
  222. public const string OldPasswordsNotSupported = "Authentication with old password no longer supported, use 4.1 style passwords.";
  223. public const string InvalidMicrosecondValue = "Microsecond must be a value between 0 and 999999.";
  224. public const string InvalidMillisecondValue = "Millisecond must be a value between 0 and 999. For more precision use Microsecond.";
  225. public const string Replication_NoAvailableServer = "No available server found.";
  226. public const string Replication_ConnectionAttemptFailed = "Attempt to connect to '{0}' server failed.";
  227. public const string UnknownConnectionProtocol = "Unknown connection protocol";
  228. public const string NoUnixSocketsOnWindows = "Unix sockets are not supported on Windows.";
  229. public const string ReplicationServerNotFound = "Replicated server not found: '{0}'";
  230. public const string ReplicationGroupNotFound = "Replication group '{0}' not found.";
  231. public const string NewValueShouldBeMySqlParameter = "The new value must be a MySqlParameter object.";
  232. public const string ValueNotCorrectType = "Value '{0}' is not of the correct type.";
  233. public const string CompressionNotSupported = "Compression is not supported.";
  234. public const string SslConnectionError = "SSL Connection error.";
  235. public const string OptionNotCurrentlySupported = "The option '{0}' is not currently supported.";
  236. public const string RSAPublicKeyRetrievalNotEnabled = "Retrieval of the RSA public key is not enabled for insecure connections.";
  237. public const string UnableToReadRSAKey = "Error encountered reading the RSA public key.";
  238. public const string LocalInfileDisabled = "Server asked for stream in response to LOAD DATA LOCAL INFILE, but the functionality is disabled by the client setting 'allowlocalinfile' to 'false'.";
  239. public const string InvalidHostNameOrAddress = "The host name or IP address is invalid.";
  240. }
  241. }
  242. #endif