Commit 42f56557 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-4941 make: AIX fails with 'Identifier not allowed in cast'; syntax error...

MDEV-4941 make: AIX fails with 'Identifier not allowed in cast'; syntax error in include/my_global.h

C++ comments in C files, and a typo in my_global.h
parent 92265da9
......@@ -101,7 +101,7 @@ int main(int argc,char *argv[])
MY_INIT(argv[0]);
sf_leaking_memory=1; /* don't report memory leaks on early exits */
plugin_data.name= 0; // initialize name
plugin_data.name= 0; /* initialize name */
/*
The following operations comprise the method for enabling or disabling
......@@ -655,11 +655,11 @@ static int load_plugin_data(char *plugin_name, char *config_file)
}
break;
}
if ((line[0] == '#') || (line[0] == '\n')) // skip comment and blank lines
if ((line[0] == '#') || (line[0] == '\n')) /* skip comment and blank lines */
{
continue;
}
if (i == -1) // if first pass, read this line as so_name
if (i == -1) /* if first pass, read this line as so_name */
{
/* Add proper file extension for soname */
strcat(line, FN_SOEXT);
......@@ -707,10 +707,10 @@ error:
static int check_options(int argc, char **argv, char *operation)
{
int i= 0; // loop counter
int num_found= 0; // number of options found (shortcut loop)
char config_file[FN_REFLEN]; // configuration file name
char plugin_name[FN_REFLEN]; // plugin name
int i= 0; /* loop counter */
int num_found= 0; /* number of options found (shortcut loop) */
char config_file[FN_REFLEN]; /* configuration file name */
char plugin_name[FN_REFLEN]; /* plugin name */
/* Form prefix strings for the options. */
const char *basedir_prefix = "--basedir=";
......
......@@ -34,7 +34,6 @@ static my_bool verbose, print_all_codes;
#include "../include/my_base.h"
#include "../mysys/my_handler_errors.h"
// #include "../include/my_compare.h"
#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
static my_bool ndb_code;
......
......@@ -297,7 +297,7 @@ C_MODE_END
#define ulonglong2double(A) my_ulonglong2double(A)
#define my_off_t2double(A) my_ulonglong2double(A)
C_MODE_START
inline double my_ulonglong2double(unsigned long long A) { return (double A); }
inline double my_ulonglong2double(unsigned long long A) { return (double)A; }
C_MODE_END
#endif /* _AIX */
......
......@@ -1385,7 +1385,8 @@ static inline my_bool read_fixed_header(DYNAMIC_COLUMN *str,
@return ER_DYNCOL_* return code
*/
int dynamic_column_get(DYNAMIC_COLUMN *str, uint column_nr,
enum enum_dyncol_func_result
dynamic_column_get(DYNAMIC_COLUMN *str, uint column_nr,
DYNAMIC_COLUMN_VALUE *store_it_here)
{
uchar *data;
......@@ -1457,7 +1458,8 @@ err:
@return ER_DYNCOL_* return code
*/
int dynamic_column_delete(DYNAMIC_COLUMN *str, uint column_nr)
enum enum_dyncol_func_result
dynamic_column_delete(DYNAMIC_COLUMN *str, uint column_nr)
{
uchar *data, *header_entry, *read, *write;
size_t offset_size, new_offset_size, length, entry_size, new_entry_size,
......@@ -2111,7 +2113,8 @@ create_new_string:
*/
int dynamic_column_update(DYNAMIC_COLUMN *str, uint column_nr,
enum enum_dyncol_func_result
dynamic_column_update(DYNAMIC_COLUMN *str, uint column_nr,
DYNAMIC_COLUMN_VALUE *value)
{
return dynamic_column_update_many(str, 1, &column_nr, value);
......
......@@ -52,11 +52,11 @@ static int qa_auth_interface (MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *inf
if (info->auth_string_length != 14)
err= CR_ERROR;
/* To be set by the plugin */
// if (strcmp(info->authenticated_as, "qa_test_1_user"))
// err= CR_ERROR;
/* if (strcmp(info->authenticated_as, "qa_test_1_user")) */
/* err= CR_ERROR; */
/* To be set by the plugin */
// if (strcmp(info->external_user, ""))
// err= CR_ERROR;
/* if (strcmp(info->external_user, "")) */
/* err= CR_ERROR; */
if (info->password_used != PASSWORD_USED_YES)
err= CR_ERROR;
if (strcmp(info->host_or_ip, "localhost"))
......@@ -78,8 +78,8 @@ static int qa_auth_interface (MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *inf
/* Assign with an external account, effect on @@local.EXTERNAL_USER */
strcpy(info->external_user, "externaluser");
/* Overwriting will cause a core dump */
// strcpy(info->host_or_ip, "host_or_ip");
// info->host_or_ip_length= 10;
/* strcpy(info->host_or_ip, "host_or_ip"); */
/* info->host_or_ip_length= 10; */
}
/* Invalid, means too high values for length */
else if (strcmp(info->user_name, "qa_test_3_user")== 0)
......@@ -117,8 +117,8 @@ static int qa_auth_interface (MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *inf
/* This assignment has no effect.*/
strcpy(info->external_user, "");
/* Overwriting will cause a core dump */
// strcpy(info->host_or_ip, "");
// info->host_or_ip_length= 0;
/* strcpy(info->host_or_ip, ""); */
/* info->host_or_ip_length= 0; */
}
/* Set to 'root' */
else if (strcmp(info->user_name, "qa_test_6_user")== 0)
......
......@@ -563,7 +563,6 @@ typedef struct st_maria_block_scan
ulonglong row_changes;
} MARIA_BLOCK_SCAN;
//typedef ICP_RESULT (*index_cond_func_t)(void *param);
struct st_maria_handler
{
......
......@@ -225,7 +225,6 @@ typedef struct st_mi_isam_share
mysql_rwlock_t mmap_lock;
} MYISAM_SHARE;
//typedef ICP_RESULT (*index_cond_func_t)(void *param);
struct st_myisam_info
{
......
......@@ -1064,6 +1064,7 @@ static void test_wl4435_3()
puts("");
/*
// The following types are not supported:
// - ENUM
// - SET
......@@ -1080,6 +1081,7 @@ static void test_wl4435_3()
// - MYSQL_TYPE_YEAR (use MYSQL_TYPE_SHORT instead);
// - MYSQL_TYPE_TINY_BLOB, MYSQL_TYPE_MEDIUM_BLOB, MYSQL_TYPE_LONG_BLOB
// (use MYSQL_TYPE_BLOB instead);
*/
WL4435_TEST("TINYINT", "127",
MYSQL_TYPE_TINY, MYSQL_TYPE_TINY,
......
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