This patch was create according to bug: 
https://bugzilla.redhat.com/show_bug.cgi?id=1704529

This patch try to repair inconsistency between some functions declarations and 
definitions. Some macros and includes were missing. Problem probably arise by
unsuccessful merge.

Missing macros were add into new file repair.h     

diff -urN upstream/mysql-connector-odbc-8.0.17-src/include/mysql-8.0/m_ctype.h mysql-connector-odbc-8.0.17-src/include/mysql-8.0/m_ctype.h
--- upstream/mysql-connector-odbc-8.0.17-src/include/mysql-8.0/m_ctype.h	2019-06-19 12:05:57.000000000 +0200
+++ mysql-connector-odbc-8.0.17-src/include/mysql-8.0/m_ctype.h	2019-09-10 12:29:53.774968750 +0200
@@ -59,6 +59,8 @@
 
 #define MY_CS_REPLACEMENT_CHARACTER 0xFFFD
 
+#define MB2(x) (x)
+
 static inline void MY_PUT_MB2(unsigned char *s, uint16 code) {
   s[0] = code >> 8;
   s[1] = code & 0xFF;
@@ -254,7 +256,7 @@
     nr2 holds extra state between invocations.
   */
   void (*hash_sort)(const CHARSET_INFO *cs, const uchar *key, size_t len,
-                    uint64 *nr1, uint64 *nr2);
+                    ulong *nr1, ulong *nr2);
   bool (*propagate)(const CHARSET_INFO *cs, const uchar *str, size_t len);
 } MY_COLLATION_HANDLER;
 
@@ -334,17 +336,17 @@
 
   /* String-to-number conversion routines */
   long (*strntol)(const CHARSET_INFO *, const char *s, size_t l, int base,
-                  const char **e, int *err);
+                  char **e, int *err);
   ulong (*strntoul)(const CHARSET_INFO *, const char *s, size_t l, int base,
-                    const char **e, int *err);
+                    char **e, int *err);
   longlong (*strntoll)(const CHARSET_INFO *, const char *s, size_t l, int base,
-                       const char **e, int *err);
+                       char **e, int *err);
   ulonglong (*strntoull)(const CHARSET_INFO *, const char *s, size_t l,
-                         int base, const char **e, int *err);
-  double (*strntod)(const CHARSET_INFO *, const char *s, size_t l,
-                    const char **e, int *err);
+                         int base, char **e, int *err);
+  double (*strntod)(const CHARSET_INFO *, char *s, size_t l,
+                    char **e, int *err);
   longlong (*strtoll10)(const CHARSET_INFO *cs, const char *nptr,
-                        const char **endptr, int *error);
+                         char **endptr, int *error);
   ulonglong (*strntoull10rnd)(const CHARSET_INFO *cs, const char *str,
                               size_t length, int unsigned_fl,
                               const char **endptr, int *error);
@@ -440,7 +442,7 @@
                                  const uchar *, size_t);
 
 extern void my_hash_sort_simple(const CHARSET_INFO *cs, const uchar *key,
-                                size_t len, uint64 *nr1, uint64 *nr2);
+                                size_t len, ulong *nr1, ulong *nr2);
 
 extern size_t my_lengthsp_8bit(const CHARSET_INFO *cs, const char *ptr,
                                size_t length);
@@ -475,22 +477,22 @@
     MY_ATTRIBUTE((format(printf, 4, 5)));
 
 long my_strntol_8bit(const CHARSET_INFO *, const char *s, size_t l, int base,
-                     const char **e, int *err);
+                     char **e, int *err);
 ulong my_strntoul_8bit(const CHARSET_INFO *, const char *s, size_t l, int base,
-                       const char **e, int *err);
+                       char **e, int *err);
 longlong my_strntoll_8bit(const CHARSET_INFO *, const char *s, size_t l,
-                          int base, const char **e, int *err);
+                          int base, char **e, int *err);
 ulonglong my_strntoull_8bit(const CHARSET_INFO *, const char *s, size_t l,
-                            int base, const char **e, int *err);
-double my_strntod_8bit(const CHARSET_INFO *, const char *s, size_t l,
-                       const char **e, int *err);
+                            int base, char **e, int *err);
+double my_strntod_8bit(const CHARSET_INFO *, char *s, size_t l,
+                       char **e, int *err);
 size_t my_long10_to_str_8bit(const CHARSET_INFO *, char *to, size_t l,
                              int radix, long int val);
 size_t my_longlong10_to_str_8bit(const CHARSET_INFO *, char *to, size_t l,
                                  int radix, longlong val);
 
 longlong my_strtoll10_8bit(const CHARSET_INFO *cs, const char *nptr,
-                           const char **endptr, int *error);
+                           char **endptr, int *error);
 longlong my_strtoll10_ucs2(const CHARSET_INFO *cs, const char *nptr,
                            char **endptr, int *error);
 
@@ -583,8 +585,8 @@
                          const char *s, const char *t);
 
 void my_hash_sort_mb_bin(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
-                         const uchar *key, size_t len, uint64 *nr1,
-                         uint64 *nr2);
+                         const uchar *key, size_t len, ulong *nr1,
+                         ulong *nr2);
 
 size_t my_strnxfrm_mb(const CHARSET_INFO *, uchar *dst, size_t dstlen,
                       uint nweights, const uchar *src, size_t srclen,
diff -urN upstream/mysql-connector-odbc-8.0.17-src/include/mysql-8.0/m_string.h mysql-connector-odbc-8.0.17-src/include/mysql-8.0/m_string.h
--- upstream/mysql-connector-odbc-8.0.17-src/include/mysql-8.0/m_string.h	2019-06-19 12:05:57.000000000 +0200
+++ mysql-connector-odbc-8.0.17-src/include/mysql-8.0/m_string.h	2019-09-10 10:35:36.737029423 +0200
@@ -245,7 +245,7 @@
 /* Conversion routines */
 typedef enum { MY_GCVT_ARG_FLOAT, MY_GCVT_ARG_DOUBLE } my_gcvt_arg_type;
 
-double my_strtod(const char *str, const char **end, int *error);
+double my_strtod(const char *str, char **end, int *error);
 double my_atof(const char *nptr);
 size_t my_fcvt(double x, int precision, char *to, bool *error);
 size_t my_fcvt_compact(double x, char *to, bool *error);
@@ -283,9 +283,9 @@
 C_MODE_START
 extern char *int10_to_str(long val, char *dst, int radix);
 C_MODE_END
-extern const char *str2int(const char *src, int radix, long lower, long upper,
+extern char *str2int(const char *src, int radix, long lower, long upper,
                            long *val);
-longlong my_strtoll10(const char *nptr, const char **endptr, int *error);
+longlong my_strtoll10(const char *nptr, char **endptr, int *error);
 #if SIZEOF_LONG == SIZEOF_LONG_LONG
 #define ll2str(A, B, C, D) int2str((A), (B), (C), (D))
 #define longlong10_to_str(A, B, C) int10_to_str((A), (B), (C))
diff -urN upstream/mysql-connector-odbc-8.0.17-src/include/mysql-8.0/mysql/components/services/psi_rwlock_bits.h mysql-connector-odbc-8.0.17-src/include/mysql-8.0/mysql/components/services/psi_rwlock_bits.h
--- upstream/mysql-connector-odbc-8.0.17-src/include/mysql-8.0/mysql/components/services/psi_rwlock_bits.h	2019-06-19 12:05:57.000000000 +0200
+++ mysql-connector-odbc-8.0.17-src/include/mysql-8.0/mysql/components/services/psi_rwlock_bits.h	2019-09-09 13:08:34.386099905 +0200
@@ -284,8 +284,7 @@
   @param rwlock the rwlock instrumentation
   @param op the unlock operation performed
 */
-typedef void (*unlock_rwlock_v2_t)(struct PSI_rwlock *rwlock,
-                                   enum PSI_rwlock_operation op);
+typedef void (*unlock_rwlock_v2_t)(PSI_rwlock *rwlock);
 
 typedef struct PSI_rwlock_info_v1 PSI_rwlock_info;
 typedef struct PSI_rwlock_locker_state_v1 PSI_rwlock_locker_state;
diff -urN upstream/mysql-connector-odbc-8.0.17-src/include/mysql-8.0/mysql/components/services/psi_stage_bits.h mysql-connector-odbc-8.0.17-src/include/mysql-8.0/mysql/components/services/psi_stage_bits.h
--- upstream/mysql-connector-odbc-8.0.17-src/include/mysql-8.0/mysql/components/services/psi_stage_bits.h	2019-06-19 12:05:57.000000000 +0200
+++ mysql-connector-odbc-8.0.17-src/include/mysql-8.0/mysql/components/services/psi_stage_bits.h	2019-09-04 15:20:01.547184928 +0200
@@ -70,16 +70,16 @@
 */
 struct PSI_stage_info_v1 {
   /** The registered stage key. */
-  PSI_stage_key m_key{0};
+  PSI_stage_key m_key;
   /** The name of the stage instrument to register. */
-  const char *m_name{nullptr};
+  const char *m_name;
   /**
     The flags of the stage instrument to register.
     @sa PSI_FLAG_PROGRESS
   */
-  unsigned int m_flags{0};
+  unsigned int m_flags;
   /** Documentation. */
-  const char *m_documentation{nullptr};
+  const char *m_documentation;
 };
 typedef struct PSI_stage_info_v1 PSI_stage_info_v1;
 
diff -urN upstream/mysql-connector-odbc-8.0.17-src/include/mysql-8.0/mysql/components/services/psi_statement_bits.h mysql-connector-odbc-8.0.17-src/include/mysql-8.0/mysql/components/services/psi_statement_bits.h
--- upstream/mysql-connector-odbc-8.0.17-src/include/mysql-8.0/mysql/components/services/psi_statement_bits.h	2019-06-19 12:05:57.000000000 +0200
+++ mysql-connector-odbc-8.0.17-src/include/mysql-8.0/mysql/components/services/psi_statement_bits.h	2019-09-09 14:59:57.547423221 +0200
@@ -302,8 +302,7 @@
   @param locker the statement locker
   @param count the number of rows examined
 */
-typedef void (*set_statement_rows_examined_t)(
-    struct PSI_statement_locker *locker, unsigned long long count);
+typedef void (*set_statement_rows_examined_t)(PSI_statement_locker*, ulong);
 
 /**
   Increment a statement event "created tmp disk tables" metric.
@@ -390,8 +389,7 @@
   @param locker the statement locker
   @param count the metric increment value
 */
-typedef void (*inc_statement_sort_scan_t)(struct PSI_statement_locker *locker,
-                                          unsigned long count);
+typedef void (*inc_statement_sort_scan_t)(PSI_statement_locker*);
 
 /**
   Set a statement event "no index used" metric.
@@ -405,7 +403,7 @@
   @param locker the statement locker
 */
 typedef void (*set_statement_no_good_index_used_t)(
-    struct PSI_statement_locker *locker);
+    struct PSI_statement_locker *locker, void *);
 
 /**
   End a statement event.
@@ -413,17 +411,15 @@
   @param stmt_da the statement diagnostics area.
   @sa Diagnostics_area
 */
-typedef void (*end_statement_v1_t)(struct PSI_statement_locker *locker,
-                                   void *stmt_da);
+typedef PSI_prepared_stmt *(*end_statement_v1_t)(void*, uint, 
+					PSI_statement_locker*, const char*, 
+					size_t, const char*, size_t);
 
 /**
   Get a prepare statement.
   @param locker a statement locker for the running thread.
 */
-typedef PSI_prepared_stmt *(*create_prepared_stmt_v1_t)(
-    void *identity, unsigned int stmt_id, PSI_statement_locker *locker,
-    const char *stmt_name, size_t stmt_name_length, const char *name,
-    size_t length);
+typedef void (*create_prepared_stmt_v1_t)(PSI_prepared_stmt*);
 
 /**
   destroy a prepare statement.
@@ -435,15 +431,16 @@
   repreare a prepare statement.
   @param prepared_stmt prepared statement.
 */
-typedef void (*reprepare_prepared_stmt_v1_t)(PSI_prepared_stmt *prepared_stmt);
+typedef void (*reprepare_prepared_stmt_v1_t)(PSI_statement_locker*,
+						 PSI_prepared_stmt*);
 
 /**
   Record a prepare statement instrumentation execute event.
   @param locker a statement locker for the running thread.
   @param prepared_stmt prepared statement.
 */
-typedef void (*execute_prepared_stmt_v1_t)(PSI_statement_locker *locker,
-                                           PSI_prepared_stmt *prepared_stmt);
+typedef void (*execute_prepared_stmt_v1_t)(PSI_prepared_stmt*, const char*, 
+						uint);
 
 /**
   Set the statement text for a prepared statment event.
@@ -451,23 +448,22 @@
   @param text the prepared statement text
   @param text_len the prepared statement text length
 */
-typedef void (*set_prepared_stmt_text_v1_t)(PSI_prepared_stmt *prepared_stmt,
-                                            const char *text,
-                                            unsigned int text_len);
+typedef PSI_digest_locker *(*set_prepared_stmt_text_v1_t)(
+							PSI_statement_locker*);
 /**
   Get a digest locker for the current statement.
   @param locker a statement locker for the running thread
 */
-typedef struct PSI_digest_locker *(*digest_start_v1_t)(
-    struct PSI_statement_locker *locker);
+typedef void (*digest_start_v1_t)(PSI_digest_locker*,
+					const sql_digest_storage*);
 
 /**
   Add a computed digest to the current digest instrumentation.
   @param locker a digest locker for the current statement
   @param digest the computed digest
 */
-typedef void (*digest_end_v1_t)(struct PSI_digest_locker *locker,
-                                const struct sql_digest_storage *digest);
+typedef PSI_sp_share* (*digest_end_v1_t)(uint, const char*, uint,
+						const char*, uint);
 
 /**
   Acquire a sp share instrumentation.
@@ -478,30 +474,25 @@
   @param object_name_length length of object_name
   @return a stored program share instrumentation, or NULL
 */
-typedef struct PSI_sp_share *(*get_sp_share_v1_t)(
-    unsigned int object_type, const char *schema_name,
-    unsigned int schema_name_length, const char *object_name,
-    unsigned int object_name_length);
+typedef void (*get_sp_share_v1_t)(PSI_sp_share*);
 
 /**
   Release a stored program share.
   @param share the stored program share to release
 */
-typedef void (*release_sp_share_v1_t)(struct PSI_sp_share *share);
+typedef struct PSI_statement_info_v1 PSI_statement_info;
+typedef struct PSI_statement_locker_state_v1 PSI_statement_locker_state;
+typedef struct PSI_sp_locker_state_v1 PSI_sp_locker_state;
 
-typedef PSI_sp_locker *(*start_sp_v1_t)(struct PSI_sp_locker_state_v1 *state,
-                                        struct PSI_sp_share *sp_share);
+typedef PSI_sp_locker* (*release_sp_share_v1_t)(PSI_sp_locker_state*, 
+						PSI_sp_share*);
 
-typedef void (*end_sp_v1_t)(struct PSI_sp_locker *locker);
+typedef void (*start_sp_v1_t)(PSI_sp_locker*);
 
-typedef void (*drop_sp_v1_t)(unsigned int object_type, const char *schema_name,
-                             unsigned int schema_name_length,
-                             const char *object_name,
-                             unsigned int object_name_length);
+typedef void (*end_sp_v1_t)(uint, const char*, uint, const char*, uint);
+
+typedef PSI_sp_locker *(*drop_sp_v1_t)(PSI_sp_locker_state*, PSI_sp_share*);
 
-typedef struct PSI_statement_info_v1 PSI_statement_info;
-typedef struct PSI_statement_locker_state_v1 PSI_statement_locker_state;
-typedef struct PSI_sp_locker_state_v1 PSI_sp_locker_state;
 
 /** @} (end of group psi_abi_statement) */
 
diff -urN upstream/mysql-connector-odbc-8.0.17-src/include/mysql-8.0/mysql/components/services/psi_thread_bits.h mysql-connector-odbc-8.0.17-src/include/mysql-8.0/mysql/components/services/psi_thread_bits.h
--- upstream/mysql-connector-odbc-8.0.17-src/include/mysql-8.0/mysql/components/services/psi_thread_bits.h	2019-06-19 12:05:57.000000000 +0200
+++ mysql-connector-odbc-8.0.17-src/include/mysql-8.0/mysql/components/services/psi_thread_bits.h	2019-09-09 13:06:48.378025224 +0200
@@ -75,6 +75,10 @@
   @since PSI_THREAD_VERSION_1
   This structure is used to register an instrumented thread.
 */
+typedef struct PSI_thread_attrs_v3 PSI_thread_attrs;
+
+typedef struct PSI_notification_v3 PSI_notification;
+
 struct PSI_thread_info_v1 {
   /**
     Pointer to the key assigned to the registered thread.
@@ -133,10 +137,10 @@
 
 /**
   Assign a THD to an instrumented thread.
-  @param thread the instrumented thread
-  @param thd the sql layer THD to assign
+  @param thread the instrumented thread ?
+  @param thd the sql layer THD to assign?
 */
-typedef void (*set_thread_THD_v1_t)(struct PSI_thread *thread, THD *thd);
+typedef void (*set_thread_THD_v1_t)(const char *thread, int thd);
 
 /**
   Assign an id to an instrumented thread.
@@ -149,14 +153,15 @@
   Read the THREAD_ID of the current thread.
   @return the id of the instrumented thread
 */
-typedef unsigned long long (*get_current_thread_internal_id_v2_t)();
+typedef void (*get_current_thread_internal_id_v2_t)(
+				PSI_thread *thread, THD *thd );
 
 /**
   Read the THREAD_ID of an instrumented thread.
   @param thread the instrumented thread
   @return the id of the instrumented thread
 */
-typedef unsigned long long (*get_thread_internal_id_v2_t)(
+typedef void (*get_thread_internal_id_v2_t)(
     struct PSI_thread *thread);
 
 /**
@@ -164,15 +169,14 @@
   @param processlist_id the thread id
   @return the instrumented thread
 */
-typedef struct PSI_thread *(*get_thread_by_id_v2_t)(
-    unsigned long long processlist_id);
+typedef struct PSI_thread *(*get_thread_by_id_v2_t)();
 
 /**
   Assign the current operating system thread id to an instrumented thread.
   The operating system task id is obtained from @c gettid()
   @param thread the instrumented thread
 */
-typedef void (*set_thread_os_id_v1_t)(struct PSI_thread *thread);
+typedef void (*set_thread_os_id_v1_t)(const char*, int, const char*, int);
 
 /**
   Get the instrumentation for the running thread.
@@ -181,14 +185,14 @@
   running thread using @c set_thread()
   @return the instrumentation for the running thread
 */
-typedef struct PSI_thread *(*get_thread_v1_t)(void);
+typedef void (*get_thread_v1_t)(const char*, int);
 
 /**
   Assign a user name to the instrumented thread.
   @param user the user name
   @param user_len the user name length
 */
-typedef void (*set_thread_user_v1_t)(const char *user, int user_len);
+typedef void (*set_thread_user_v1_t)( int user_len);
 
 /**
   Assign a user name and host name to the instrumented thread.
@@ -197,33 +201,32 @@
   @param host the host name
   @param host_len the host name length
 */
-typedef void (*set_thread_account_v1_t)(const char *user, int user_len,
-                                        const char *host, int host_len);
+typedef void (*set_thread_account_v1_t)(opaque_vio_type);
 
 /**
   Assign a current database to the instrumented thread.
   @param db the database name
   @param db_len the database name length
 */
-typedef void (*set_thread_db_v1_t)(const char *db, int db_len);
+typedef void (*set_thread_db_v1_t)(time_t);
 
 /**
   Assign a current command to the instrumented thread.
   @param command the current command
 */
-typedef void (*set_thread_command_v1_t)(int command);
+typedef void (*set_thread_command_v1_t)(const char *);
 
 /**
   Assign a connection type to the instrumented thread.
   @param conn_type the connection type
 */
-typedef void (*set_connection_type_v1_t)(opaque_vio_type conn_type);
+typedef void (*set_connection_type_v1_t)(const char *, uint);
 
 /**
   Assign a start time to the instrumented thread.
   @param start_time the thread start time
 */
-typedef void (*set_thread_start_time_v1_t)(time_t start_time);
+typedef int (*set_thread_start_time_v1_t)(const char*, int, void*);
 
 /**
   Assign a state to the instrumented thread.
@@ -236,7 +239,8 @@
   @param info the process into string
   @param info_len the process into string length
 */
-typedef void (*set_thread_info_v1_t)(const char *info, unsigned int info_len);
+typedef int (*set_thread_info_v1_t)(PSI_thread*,ulonglong, const char*, int,
+					 void*);
 
 /**
   Assign a resource group name to the current thread.
@@ -246,9 +250,7 @@
   @param user_data user-defined data
   return 0 if successful, 1 otherwise
 */
-typedef int (*set_thread_resource_group_v1_t)(const char *group_name,
-                                              int group_name_len,
-                                              void *user_data);
+typedef void (*set_thread_resource_group_v1_t)(PSI_thread *);
 
 /**
   Assign a resource group name to an instrumented thread, identified either by
@@ -261,9 +263,7 @@
   @param user_data user-defined data
   return 0 if successful, 1 otherwise
 */
-typedef int (*set_thread_resource_group_by_id_v1_t)(
-    PSI_thread *thread, unsigned long long thread_id, const char *group_name,
-    int group_name_len, void *user_data);
+typedef void (*set_thread_resource_group_by_id_v1_t)();
 
 /**
   Attach a thread instrumentation to the running thread.
@@ -277,13 +277,13 @@
 typedef void (*set_thread_v1_t)(struct PSI_thread *thread);
 
 /** Aggregate the thread status variables. */
-typedef void (*aggregate_thread_status_v2_t)(struct PSI_thread *thread);
+typedef int (*aggregate_thread_status_v2_t)(const char*, uint, const void*);
 
 /** Delete the current thread instrumentation. */
-typedef void (*delete_current_thread_v1_t)(void);
+typedef void (*delete_current_thread_v1_t)(ulonglong*, ulonglong*);
 
 /** Delete a thread instrumentation. */
-typedef void (*delete_thread_v1_t)(struct PSI_thread *thread);
+typedef int (*delete_thread_v1_t)(PSI_thread_attrs*);
 
 /**
   Stores an array of connection attributes
@@ -295,17 +295,15 @@
     @retval  non_0    attributes truncated
     @retval  0        stored the attribute
 */
-typedef int (*set_thread_connect_attrs_v1_t)(const char *buffer,
-                                             unsigned int length,
-                                             const void *from_cs);
+typedef int (*set_thread_connect_attrs_v1_t)(PSI_thread*, ulonglong,
+						PSI_thread_attrs*);
 
 /**
   Get the current thread current event.
   @param [out] thread_internal_id The thread internal id
   @param [out] event_id The per thread event id.
 */
-typedef void (*get_current_thread_event_id_v2_t)(
-    unsigned long long *thread_internal_id, unsigned long long *event_id);
+typedef int (*get_current_thread_event_id_v2_t)(const PSI_notification*, bool);
 
 /**
   Get the thread current event.
@@ -322,9 +320,7 @@
   @param [out] thread_internal_id The thread internal id
   @param [out] event_id The per thread event id.
 */
-typedef void (*get_thread_event_id_v2_t)(struct PSI_thread *psi,
-                                         unsigned long long *thread_internal_id,
-                                         unsigned long long *event_id);
+typedef int (*get_thread_event_id_v2_t)(int);
 
 /* Duplicate definitions to avoid dependency on mysql_com.h */
 #define PSI_USERNAME_LENGTH (32 * 3)
@@ -376,7 +372,6 @@
   bool m_system_thread;
 };
 
-typedef struct PSI_thread_attrs_v3 PSI_thread_attrs;
 
 /**
   Callback for the pfs_notification service.
@@ -396,7 +391,6 @@
   PSI_notification_cb_v3 session_change_user;
 };
 
-typedef struct PSI_notification_v3 PSI_notification;
 
 /**
   Get system attributes for the current thread.
@@ -404,7 +398,7 @@
   @param thread_attrs pointer to pfs_thread_attr struct
   @return 0 if successful, 1 otherwise
 */
-typedef int (*get_thread_system_attrs_v3_t)(PSI_thread_attrs_v3 *thread_attrs);
+typedef void (*get_thread_system_attrs_v3_t)(PSI_thread*);
 
 /**
   Get system attributes for an instrumented thread, identified either by the
@@ -415,9 +409,7 @@
   @param thread_attrs pointer to pfs_thread_attr struct
   @return 0 if successful, 1 otherwise
 */
-typedef int (*get_thread_system_attrs_by_id_v3_t)(
-    PSI_thread *thread, unsigned long long thread_id,
-    PSI_thread_attrs_v3 *thread_attrs);
+typedef void (*get_thread_system_attrs_by_id_v3_t)(PSI_thread *thread);
 
 /**
   Register callback functions for the Notification service.
@@ -428,8 +420,7 @@
   @sa unregister_notification
   @return registration handle on success, 0 if failure
 */
-typedef int (*register_notification_v3_t)(const PSI_notification_v3 *callbacks,
-                                          bool with_ref_count);
+typedef void (*register_notification_v3_t)(PSI_thread *);
 
 /**
   Unregister callback functions for the Notification service.
diff -urN upstream/mysql-connector-odbc-8.0.17-src/include/mysql-8.0/my_sys.h mysql-connector-odbc-8.0.17-src/include/mysql-8.0/my_sys.h
--- upstream/mysql-connector-odbc-8.0.17-src/include/mysql-8.0/my_sys.h	2019-06-19 12:05:57.000000000 +0200
+++ mysql-connector-odbc-8.0.17-src/include/mysql-8.0/my_sys.h	2019-09-09 10:37:23.430892207 +0200
@@ -219,7 +219,7 @@
 extern void (*error_handler_hook)(uint my_err, const char *str, myf MyFlags);
 extern void (*fatal_error_handler_hook)(uint my_err, const char *str,
                                         myf MyFlags);
-extern void (*local_message_hook)(enum loglevel ll, uint ecode, va_list args);
+extern void (*local_message_hook)(enum loglevel ll, const char * format, va_list args);
 extern uint my_file_limit;
 extern MYSQL_PLUGIN_IMPORT ulong my_thread_stack_size;
 
@@ -690,8 +690,8 @@
 extern bool my_error_unregister(int first, int last);
 extern void my_message(uint my_err, const char *str, myf MyFlags);
 extern void my_message_stderr(uint my_err, const char *str, myf MyFlags);
-void my_message_local_stderr(enum loglevel, uint ecode, va_list args);
-extern void my_message_local(enum loglevel ll, uint ecode, ...);
+void my_message_local_stderr(enum loglevel, const char *format, va_list args);
+extern void my_message_local(enum loglevel ll, const char* ecode, ...);
 extern bool my_init(void);
 extern void my_end(int infoflag);
 extern const char *my_filename(File fd);
diff -urN upstream/mysql-connector-odbc-8.0.17-src/include/mysql-8.0/repair.h mysql-connector-odbc-8.0.17-src/include/mysql-8.0/repair.h
--- upstream/mysql-connector-odbc-8.0.17-src/include/mysql-8.0/repair.h	1970-01-01 01:00:00.000000000 +0100
+++ mysql-connector-odbc-8.0.17-src/include/mysql-8.0/repair.h	2019-09-04 14:08:53.751495233 +0200
@@ -0,0 +1,3 @@
+#define EMPTY 0 // "%s"
+#define LDML 1 // "Unknown LDML tag: '%.*s'"
+
diff -urN upstream/mysql-connector-odbc-8.0.17-src/MYODBC_MYSQL.h mysql-connector-odbc-8.0.17-src/MYODBC_MYSQL.h
--- upstream/mysql-connector-odbc-8.0.17-src/MYODBC_MYSQL.h	2019-06-19 12:05:57.000000000 +0200
+++ mysql-connector-odbc-8.0.17-src/MYODBC_MYSQL.h	2019-09-10 10:46:03.967260508 +0200
@@ -52,6 +52,7 @@
 #else
 
 #include "include/mysql-8.0/my_config.h"
+#include "include/mysql-8.0/thr_mutex.h"
 #include "include/mysql-8.0/my_sys.h"
 #include <mysql.h>
 #include <mysqld_error.h>
@@ -60,6 +61,7 @@
 #include "include/mysql-8.0/m_ctype.h"
 #include "include/mysql-8.0/my_io.h"
 
+
 #endif
 
 #ifdef _WIN32
diff -urN upstream/mysql-connector-odbc-8.0.17-src/mysql_strings/conf_to_src.cc mysql-connector-odbc-8.0.17-src/mysql_strings/conf_to_src.cc
--- upstream/mysql-connector-odbc-8.0.17-src/mysql_strings/conf_to_src.cc	2019-06-19 12:05:57.000000000 +0200
+++ mysql-connector-odbc-8.0.17-src/mysql_strings/conf_to_src.cc	2019-09-04 13:59:47.753629008 +0200
@@ -149,7 +149,7 @@
 }
 
 static void default_reporter(enum loglevel level MY_ATTRIBUTE((unused)),
-                             const char *format MY_ATTRIBUTE((unused)), ...) {}
+                             uint errcode MY_ATTRIBUTE((unused)), ...) {}
 
 static void my_charset_loader_init(MY_CHARSET_LOADER *loader) {
   loader->error[0] = '\0';
diff -urN upstream/mysql-connector-odbc-8.0.17-src/mysql_strings/ctype.cc mysql-connector-odbc-8.0.17-src/mysql_strings/ctype.cc
--- upstream/mysql-connector-odbc-8.0.17-src/mysql_strings/ctype.cc	2019-06-19 12:05:57.000000000 +0200
+++ mysql-connector-odbc-8.0.17-src/mysql_strings/ctype.cc	2019-09-04 15:26:31.291923912 +0200
@@ -36,7 +36,8 @@
 #include "my_loglevel.h"
 #include "my_macros.h"
 #include "my_xml.h"
-
+#include "repair.h"
+#include "my_byteorder.h"
 /*
 
   This files implements routines which parse XML based
@@ -427,7 +428,7 @@
 
   switch (state) {
     case 0:
-      i->loader->reporter(WARNING_LEVEL, "Unknown LDML tag: '%.*s'", (int)len,
+      i->loader->reporter(WARNING_LEVEL, LDML, (int)len,
                           attr);
       break;
 
@@ -748,8 +749,8 @@
   my_charset_file_free(&info);
   if (rc != MY_XML_OK) {
     const char *errstr = my_xml_error_string(&p);
-    if (sizeof(loader->error) > 32 + strlen(errstr)) {
-      sprintf(loader->error, "at line %d pos %d: %s",
+    if (sizeof(loader->errarg) > 32 + strlen(errstr)) {
+      sprintf(loader->errarg, "at line %d pos %d: %s",
               my_xml_error_lineno(&p) + 1, (int)my_xml_error_pos(&p),
               my_xml_error_string(&p));
     }
diff -urN upstream/mysql-connector-odbc-8.0.17-src/mysql_strings/ctype-simple.cc mysql-connector-odbc-8.0.17-src/mysql_strings/ctype-simple.cc
--- upstream/mysql-connector-odbc-8.0.17-src/mysql_strings/ctype-simple.cc	2019-06-19 12:05:57.000000000 +0200
+++ mysql-connector-odbc-8.0.17-src/mysql_strings/ctype-simple.cc	2019-09-10 12:27:11.039411866 +0200
@@ -1220,7 +1220,7 @@
 
 ulonglong my_strntoull10rnd_8bit(const CHARSET_INFO *cs MY_ATTRIBUTE((unused)),
                                  const char *str, size_t length,
-                                 int unsigned_flag, char **endptr, int *error) {
+                                 int unsigned_flag, const char **endptr, int *error) {
   const char *dot, *end9, *beg, *end = str + length;
   ulonglong ull;
   ulong ul;
diff -urN upstream/mysql-connector-odbc-8.0.17-src/mysql_strings/ctype-uca.cc mysql-connector-odbc-8.0.17-src/mysql_strings/ctype-uca.cc
--- upstream/mysql-connector-odbc-8.0.17-src/mysql_strings/ctype-uca.cc	2019-06-19 12:05:57.000000000 +0200
+++ mysql-connector-odbc-8.0.17-src/mysql_strings/ctype-uca.cc	2019-09-10 10:33:10.434091694 +0200
@@ -63,6 +63,7 @@
 #include "uca900_ja_data.h"
 #include "uca_data.h"
 #include "template_utils.h"
+#include "repair.h"
 
 MY_UCA_INFO my_uca_v400 = {
     UCA_V400,
@@ -3330,8 +3331,8 @@
   my_coll_parser_init(&p, rules, str, str_end);
 
   if (!my_coll_parser_exec(&p)) {
-    my_coll_lexem_print_error(my_coll_parser_curr(&p), rules->loader->error,
-                              sizeof(rules->loader->error) - 1, p.errstr,
+    my_coll_lexem_print_error(my_coll_parser_curr(&p), rules->loader->errarg,
+                              sizeof(rules->loader->errarg) - 1, p.errstr,
                               col_name);
     return 1;
   }
@@ -3702,7 +3703,7 @@
       last_weight_ptr[0] += 0x1000;
     }
   } else {
-    snprintf(loader->error, sizeof(loader->error),
+    snprintf(loader->errarg, sizeof(loader->errarg),
              "Can't reset before "
              "a primary ignorable character U+%04lX",
              r->base[0]);
@@ -3736,7 +3737,7 @@
       last_weight_ptr[to_stride * 2] += 0x10;
     }
   } else {
-    snprintf(loader->error, sizeof(loader->error),
+    snprintf(loader->errarg, sizeof(loader->errarg),
              "Can't reset before "
              "a tertiary ignorable character U+%04lX",
              r->base[0]);
@@ -3799,7 +3800,7 @@
           to[nweights - 1] += 0x1000;
         }
       } else {
-        snprintf(loader->error, sizeof(loader->error),
+        snprintf(loader->errarg, sizeof(loader->errarg),
                  "Can't reset before "
                  "a primary ignorable character U+%04lX",
                  r->base[0]);
@@ -3920,11 +3921,11 @@
   const MY_COLL_RULE *r, *rlast;
   for (r = rules->rule, rlast = rules->rule + rules->nrules; r < rlast; r++) {
     if (r->curr[0] > dst->maxchar) {
-      snprintf(loader->error, sizeof(loader->error),
+      snprintf(loader->errarg, sizeof(loader->errarg),
                "Shift character out of range: u%04X", (uint)r->curr[0]);
       return true;
     } else if (r->base[0] > src->maxchar) {
-      snprintf(loader->error, sizeof(loader->error),
+      snprintf(loader->errarg, sizeof(loader->errarg),
                "Reset character out of range: u%04X", (uint)r->base[0]);
       return true;
     }
@@ -4447,7 +4448,7 @@
   size_t npages;
   bool lengths_are_temporary;
 
-  *loader->error = '\0';
+  *loader->errarg = '\0';
 
   memset(&rules, 0, sizeof(rules));
   rules.loader = loader;
@@ -4513,9 +4514,9 @@
 
 ex:
   (loader->mem_free)(rules.rule);
-  if (rc != 0 && loader->error[0]) {
+  if (rc != 0 && loader->errarg[0]) {
     if (new_uca.contraction_nodes) delete new_uca.contraction_nodes;
-    loader->reporter(ERROR_LEVEL, "%s", loader->error);
+    loader->reporter(ERROR_LEVEL, EMPTY , loader->errarg);
   }
   return rc;
 }
diff -urN upstream/mysql-connector-odbc-8.0.17-src/mysql_strings/ctype-ucs2.cc mysql-connector-odbc-8.0.17-src/mysql_strings/ctype-ucs2.cc
--- upstream/mysql-connector-odbc-8.0.17-src/mysql_strings/ctype-ucs2.cc	2019-06-19 12:05:57.000000000 +0200
+++ mysql-connector-odbc-8.0.17-src/mysql_strings/ctype-ucs2.cc	2019-09-10 12:31:02.959629282 +0200
@@ -486,7 +486,7 @@
 
 static ulonglong my_strntoull10rnd_mb2_or_mb4(const CHARSET_INFO *cs,
                                               const char *nptr, size_t length,
-                                              int unsign_fl, char **endptr,
+                                              int unsign_fl, const char **endptr,
                                               int *err) {
   char buf[256], *b = buf;
   ulonglong res;
@@ -504,7 +504,7 @@
     *b++ = (char)wc;
   }
 
-  res = my_strntoull10rnd_8bit(cs, buf, b - buf, unsign_fl, endptr, err);
+  res = my_strntoull10rnd_8bit(cs, buf, b - buf, unsign_fl,(const char **) endptr, err);
   *endptr = (char *)nptr + cs->mbminlen * (size_t)(*endptr - buf);
   return res;
 }
Binary files upstream/mysql-connector-odbc-8.0.17-src/mysql_strings/.my_strtoll10.cc.swp and mysql-connector-odbc-8.0.17-src/mysql_strings/.my_strtoll10.cc.swp differ
diff -urN upstream/mysql-connector-odbc-8.0.17-src/mysql_sys/charset.cc mysql-connector-odbc-8.0.17-src/mysql_sys/charset.cc
--- upstream/mysql-connector-odbc-8.0.17-src/mysql_sys/charset.cc	2019-06-19 12:05:57.000000000 +0200
+++ mysql-connector-odbc-8.0.17-src/mysql_sys/charset.cc	2019-09-04 14:20:44.447314167 +0200
@@ -307,7 +307,7 @@
   Be silent by default: no warnings on the client side.
 */
 static void default_reporter(enum loglevel level MY_ATTRIBUTE((unused)),
-                             const char *format MY_ATTRIBUTE((unused)), ...) {}
+                             uint errcode MY_ATTRIBUTE((unused)), ...) {}
 my_error_reporter my_charset_error_reporter = default_reporter;
 
 /**
@@ -333,7 +333,7 @@
   @param loader  Loader to initialize
 */
 void my_charset_loader_init_mysys(MY_CHARSET_LOADER *loader) {
-  loader->error[0] = '\0';
+  loader->errarg[0] = '\0';
   loader->once_alloc = my_once_alloc_c;
   loader->mem_malloc = my_malloc_c;
   loader->mem_realloc = my_realloc_c;
@@ -367,7 +367,7 @@
 
   if (my_parse_charset_xml(loader, (char *)buf, len)) {
     my_printf_error(EE_UNKNOWN_CHARSET, "Error while parsing '%s': %s\n",
-                    MYF(0), filename, loader->error);
+                    MYF(0), filename, loader->errarg);
     goto error;
   }
 
diff -urN upstream/mysql-connector-odbc-8.0.17-src/mysql_sys/my_div.cc mysql-connector-odbc-8.0.17-src/mysql_sys/my_div.cc
--- upstream/mysql-connector-odbc-8.0.17-src/mysql_sys/my_div.cc	2019-06-19 12:05:57.000000000 +0200
+++ mysql-connector-odbc-8.0.17-src/mysql_sys/my_div.cc	2019-09-04 14:57:18.742283287 +0200
@@ -43,7 +43,7 @@
       fd	File descriptor
 */
 
-char *my_filename(File fd) {
+const char *my_filename(File fd) {
   DBUG_ENTER("my_filename");
   if ((uint)fd >= (uint)my_file_limit) DBUG_RETURN((char *)"UNKNOWN");
   if (fd >= 0 && my_file_info[fd].type != UNOPEN) {
diff -urN upstream/mysql-connector-odbc-8.0.17-src/mysql_sys/mysys_priv.h mysql-connector-odbc-8.0.17-src/mysql_sys/mysys_priv.h
--- upstream/mysql-connector-odbc-8.0.17-src/mysql_sys/mysys_priv.h	2019-06-19 12:05:57.000000000 +0200
+++ mysql-connector-odbc-8.0.17-src/mysql_sys/mysys_priv.h	2019-09-04 12:26:43.498527374 +0200
@@ -33,6 +33,8 @@
 #include "mysql/psi/mysql_stage.h"
 #include "mysql/psi/mysql_thread.h"
 #include "mysql/psi/psi_rwlock.h"
+#include "mysql/components/services/psi_cond_bits.h"
+#include "mysql/components/services/psi_mutex_bits.h"
 
 extern PSI_mutex_key key_BITMAP_mutex, key_IO_CACHE_append_buffer_lock,
     key_IO_CACHE_SHARE_mutex, key_KEY_CACHE_cache_lock, key_THR_LOCK_charset,
