Commit 1d920529 authored by peter@mysql.com's avatar peter@mysql.com

SCRAM Remove spaces from most changed files.

This alters not only my code so it looks like I'm not only one adding the spaces.
parent 5fa02daa
......@@ -84,15 +84,15 @@ static void store_values(MYSQL_RES *result);
The order of commands must be the same as command_names,
except ADMIN_ERROR
*/
enum commands {
ADMIN_ERROR,
enum commands {
ADMIN_ERROR,
ADMIN_CREATE, ADMIN_DROP, ADMIN_SHUTDOWN,
ADMIN_RELOAD, ADMIN_REFRESH, ADMIN_VER,
ADMIN_PROCESSLIST, ADMIN_STATUS, ADMIN_KILL,
ADMIN_DEBUG, ADMIN_VARIABLES, ADMIN_FLUSH_LOGS,
ADMIN_FLUSH_HOSTS, ADMIN_FLUSH_TABLES, ADMIN_PASSWORD,
ADMIN_PING, ADMIN_EXTENDED_STATUS, ADMIN_FLUSH_STATUS,
ADMIN_FLUSH_PRIVILEGES, ADMIN_START_SLAVE, ADMIN_STOP_SLAVE,
ADMIN_RELOAD, ADMIN_REFRESH, ADMIN_VER,
ADMIN_PROCESSLIST, ADMIN_STATUS, ADMIN_KILL,
ADMIN_DEBUG, ADMIN_VARIABLES, ADMIN_FLUSH_LOGS,
ADMIN_FLUSH_HOSTS, ADMIN_FLUSH_TABLES, ADMIN_PASSWORD,
ADMIN_PING, ADMIN_EXTENDED_STATUS, ADMIN_FLUSH_STATUS,
ADMIN_FLUSH_PRIVILEGES, ADMIN_START_SLAVE, ADMIN_STOP_SLAVE,
ADMIN_FLUSH_THREADS, ADMIN_OLD_PASSWORD
};
static const char *command_names[]= {
......@@ -102,8 +102,8 @@ static const char *command_names[]= {
"debug", "variables", "flush-logs",
"flush-hosts", "flush-tables", "password",
"ping", "extended-status", "flush-status",
"flush-privileges", "start-slave", "stop-slave",
"flush-threads","old-password",
"flush-privileges", "start-slave", "stop-slave",
"flush-threads","old-password",
NullS
};
......@@ -152,7 +152,7 @@ static struct my_option my_long_options[] =
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#ifdef HAVE_SMEM
{"shared_memory_base_name", OPT_SHARED_MEMORY_BASE_NAME,
"Base name of shared memory", (gptr*) &shared_memory_base_name, (gptr*) &shared_memory_base_name,
"Base name of shared memory", (gptr*) &shared_memory_base_name, (gptr*) &shared_memory_base_name,
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif
{"silent", 's', "Silently exit if one can't connect to server",
......@@ -172,7 +172,7 @@ static struct my_option my_long_options[] =
(gptr*) &opt_verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"version", 'V', "Output version information and exit", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
{"vertical", 'E',
{"vertical", 'E',
"Print output vertically. Is similar to --relative, but prints output vertically.",
(gptr*) &opt_vertical, (gptr*) &opt_vertical, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0},
......@@ -311,7 +311,7 @@ int main(int argc,char *argv[])
#ifdef HAVE_SMEM
if (shared_memory_base_name)
mysql_options(&mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
#endif
#endif
if (sql_connect(&mysql, option_wait))
error = 1;
else
......@@ -417,7 +417,7 @@ static my_bool sql_connect(MYSQL *mysql, uint wait)
wait--; /* One less retry */
if ((mysql_errno(mysql) != CR_CONN_HOST_ERROR) &&
(mysql_errno(mysql) != CR_CONNECTION_ERROR))
{
{
fprintf(stderr,"Got error: %s\n", mysql_error(mysql));
if (!option_force)
return 1;
......@@ -432,7 +432,7 @@ static my_bool sql_connect(MYSQL *mysql, uint wait)
}
else
{
putc('.',stderr);
putc('.',stderr);
(void) fflush(stderr);
}
}
......@@ -451,7 +451,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
{
const char *status;
struct rand_struct rand_st;
for (; argc > 0 ; argv++,argc--)
{
switch (find_type(argv[0],&command_typelib,2)) {
......@@ -661,7 +661,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
MYSQL_RES *res;
MYSQL_ROW row;
uint rownr = 0;
void (*func) (MYSQL_RES*, MYSQL_ROW, uint);
void (*func) (MYSQL_RES*, MYSQL_ROW, uint);
new_line = 1;
if (mysql_query(mysql, "show status") ||
......@@ -759,9 +759,9 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
char buff[128],crypted_pw[64];
time_t start_time;
/* Do initialization the same way as we do in mysqld */
start_time=time((time_t*) 0);
start_time=time((time_t*) 0);
randominit(&rand_st,(ulong) start_time,(ulong) start_time/2);
if (argc < 2)
{
my_printf_error(0,"Too few arguments to change password",MYF(ME_BELL));
......@@ -1034,7 +1034,7 @@ static void print_relative_row_vert(MYSQL_RES *result __attribute__((unused)),
putchar('|');
tmp = cur[1] ? strtoull(cur[1], NULL, 0) : (ulonglong) 0;
printf(" %-*s|", ex_val_max_len[row] + 1,
printf(" %-*s|", ex_val_max_len[row] + 1,
llstr((tmp - last_values[row]), buff));
/* Find the minimum row length needed to output the relative value */
......
......@@ -142,11 +142,11 @@ typedef struct st_net {
char save_char;
my_bool report_error; /* We should report error (we have unreported error) */
my_bool no_send_ok;
/*
Pointer to query object in query cache, do not equal NULL (0) for
queries in cache that have not stored its results yet
/*
Pointer to query object in query cache, do not equal NULL (0) for
queries in cache that have not stored its results yet
*/
gptr query_cache_query;
gptr query_cache_query;
} NET;
#define packet_error (~(unsigned long) 0)
......@@ -158,7 +158,7 @@ enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
MYSQL_TYPE_LONGLONG,MYSQL_TYPE_INT24,
MYSQL_TYPE_DATE, MYSQL_TYPE_TIME,
MYSQL_TYPE_DATETIME, MYSQL_TYPE_YEAR,
MYSQL_TYPE_NEWDATE,
MYSQL_TYPE_NEWDATE,
MYSQL_TYPE_ENUM=247,
MYSQL_TYPE_SET=248,
MYSQL_TYPE_TINY_BLOB=249,
......@@ -172,32 +172,32 @@ enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
};
/* For backward compatibility */
#define FIELD_TYPE_DECIMAL MYSQL_TYPE_DECIMAL
#define FIELD_TYPE_TINY MYSQL_TYPE_TINY
#define FIELD_TYPE_SHORT MYSQL_TYPE_SHORT
#define FIELD_TYPE_LONG MYSQL_TYPE_LONG
#define FIELD_TYPE_FLOAT MYSQL_TYPE_FLOAT
#define FIELD_TYPE_DOUBLE MYSQL_TYPE_DOUBLE
#define FIELD_TYPE_NULL MYSQL_TYPE_NULL
#define FIELD_TYPE_TIMESTAMP MYSQL_TYPE_TIMESTAMP
#define FIELD_TYPE_LONGLONG MYSQL_TYPE_LONGLONG
#define FIELD_TYPE_INT24 MYSQL_TYPE_INT24
#define FIELD_TYPE_DATE MYSQL_TYPE_DATE
#define FIELD_TYPE_TIME MYSQL_TYPE_TIME
#define FIELD_TYPE_DATETIME MYSQL_TYPE_DATETIME
#define FIELD_TYPE_YEAR MYSQL_TYPE_YEAR
#define FIELD_TYPE_NEWDATE MYSQL_TYPE_NEWDATE
#define FIELD_TYPE_ENUM MYSQL_TYPE_ENUM
#define FIELD_TYPE_SET MYSQL_TYPE_SET
#define FIELD_TYPE_TINY_BLOB MYSQL_TYPE_TINY_BLOB
#define FIELD_TYPE_MEDIUM_BLOB MYSQL_TYPE_MEDIUM_BLOB
#define FIELD_TYPE_DECIMAL MYSQL_TYPE_DECIMAL
#define FIELD_TYPE_TINY MYSQL_TYPE_TINY
#define FIELD_TYPE_SHORT MYSQL_TYPE_SHORT
#define FIELD_TYPE_LONG MYSQL_TYPE_LONG
#define FIELD_TYPE_FLOAT MYSQL_TYPE_FLOAT
#define FIELD_TYPE_DOUBLE MYSQL_TYPE_DOUBLE
#define FIELD_TYPE_NULL MYSQL_TYPE_NULL
#define FIELD_TYPE_TIMESTAMP MYSQL_TYPE_TIMESTAMP
#define FIELD_TYPE_LONGLONG MYSQL_TYPE_LONGLONG
#define FIELD_TYPE_INT24 MYSQL_TYPE_INT24
#define FIELD_TYPE_DATE MYSQL_TYPE_DATE
#define FIELD_TYPE_TIME MYSQL_TYPE_TIME
#define FIELD_TYPE_DATETIME MYSQL_TYPE_DATETIME
#define FIELD_TYPE_YEAR MYSQL_TYPE_YEAR
#define FIELD_TYPE_NEWDATE MYSQL_TYPE_NEWDATE
#define FIELD_TYPE_ENUM MYSQL_TYPE_ENUM
#define FIELD_TYPE_SET MYSQL_TYPE_SET
#define FIELD_TYPE_TINY_BLOB MYSQL_TYPE_TINY_BLOB
#define FIELD_TYPE_MEDIUM_BLOB MYSQL_TYPE_MEDIUM_BLOB
#define FIELD_TYPE_LONG_BLOB MYSQL_TYPE_LONG_BLOB
#define FIELD_TYPE_BLOB MYSQL_TYPE_BLOB
#define FIELD_TYPE_VAR_STRING MYSQL_TYPE_VAR_STRING
#define FIELD_TYPE_STRING MYSQL_TYPE_STRING
#define FIELD_TYPE_CHAR MYSQL_TYPE_TINY
#define FIELD_TYPE_BLOB MYSQL_TYPE_BLOB
#define FIELD_TYPE_VAR_STRING MYSQL_TYPE_VAR_STRING
#define FIELD_TYPE_STRING MYSQL_TYPE_STRING
#define FIELD_TYPE_CHAR MYSQL_TYPE_TINY
#define FIELD_TYPE_INTERVAL MYSQL_TYPE_ENUM
#define FIELD_TYPE_GEOMETRY MYSQL_TYPE_GEOMETRY
#define FIELD_TYPE_GEOMETRY MYSQL_TYPE_GEOMETRY
#if TO_BE_INCLUDED_LATER
/* For bind applications, to indicate unsigned buffers */
......@@ -296,11 +296,11 @@ my_bool validate_password(const char* password, const char* message,
void password_hash_stage1(char *to, const char *password);
void password_hash_stage2(char *to,const char *salt);
void password_crypt(const char* from,char* to, const char* password,int length);
void get_hash_and_password(ulong* salt, unsigned char pversion,char* hash,
void get_hash_and_password(ulong* salt, unsigned char pversion,char* hash,
unsigned char* bin_password);
void get_salt_from_password(unsigned long *res,const char *password);
void create_key_from_old_password(const char* password,char* key);
void make_password_from_salt(char *to, unsigned long *hash_res,
void make_password_from_salt(char *to, unsigned long *hash_res,
unsigned char password_version);
char *scramble(char *to,const char *message,const char *password,
my_bool old_ver);
......
This diff is collapsed.
......@@ -328,7 +328,7 @@ static int mc_sock_connect(my_socket s, const struct sockaddr *name,
** or packet is an error message
*****************************************************************************/
ulong
ulong
mc_net_safe_read(MYSQL *mysql)
{
NET *net= &mysql->net;
......@@ -433,7 +433,7 @@ my_bool mc_mysql_reconnect(MYSQL *mysql)
int
int
mc_simple_command(MYSQL *mysql,enum enum_server_command command,
const char *arg, uint length, my_bool skipp_check)
{
......@@ -483,7 +483,7 @@ mc_simple_command(MYSQL *mysql,enum enum_server_command command,
}
MYSQL *
MYSQL *
mc_mysql_connect(MYSQL *mysql,const char *host, const char *user,
const char *passwd, const char *db,
uint port, const char *unix_socket,uint client_flag,
......@@ -662,7 +662,7 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user,
vio_poll_read(net->vio, mysql->options.connect_timeout))
{
net->last_errno= CR_SERVER_LOST;
strmov(net->last_error,ER(net->last_errno));
strmov(net->last_error,ER(net->last_errno));
goto error;
}
if ((pkt_length=mc_net_safe_read(mysql)) == packet_error)
......@@ -777,7 +777,7 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user,
if (my_net_write(net,buff,(uint) (2)) || net_flush(net))
{
net->last_errno= CR_SERVER_LOST;
strmov(net->last_error,ER(net->last_errno));
strmov(net->last_error,ER(net->last_errno));
goto error;
}
/* Do the SSL layering. */
......@@ -801,7 +801,7 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user,
}
DBUG_PRINT("info",("user: %s",buff+5));
/*
We always start with old type handshake the only difference is message sent
If server handles secure connection type we'll not send the real scramble
......@@ -918,7 +918,7 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user,
** NB! Errors are not reported until you do mysql_real_connect.
**************************************************************************
*/
int
int
mysql_ssl_clear(MYSQL *mysql)
{
my_free(mysql->options.ssl_key, MYF(MY_ALLOW_ZERO_PTR));
......@@ -943,7 +943,7 @@ mysql_ssl_clear(MYSQL *mysql)
** If handle is alloced by mysql connect free it.
*************************************************************************/
void
void
mc_mysql_close(MYSQL *mysql)
{
DBUG_ENTER("mysql_close");
......
......@@ -472,9 +472,9 @@ Field *find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables,
Field *find_field_in_table(THD *thd,TABLE *table,const char *name,uint length,
bool check_grant,bool allow_rowid);
#ifdef HAVE_OPENSSL
struct st_des_keyblock
{
des_cblock key1, key2, key3;
struct st_des_keyblock
{
des_cblock key1, key2, key3;
};
struct st_des_keyschedule
{
......@@ -555,9 +555,9 @@ SQL_SELECT *make_select(TABLE *head, table_map const_tables,
enum find_item_error_report_type {REPORT_ALL_ERRORS, REPORT_EXCEPT_NOT_FOUND,
IGNORE_ERRORS};
extern const Item **not_found_item;
Item ** find_item_in_list(Item *item, List<Item> &items,
Item ** find_item_in_list(Item *item, List<Item> &items,
find_item_error_report_type report_error);
bool insert_fields(THD *thd,TABLE_LIST *tables,
bool insert_fields(THD *thd,TABLE_LIST *tables,
const char *db_name, const char *table_name,
List_iterator<Item> *it);
bool setup_tables(TABLE_LIST *tables);
......
This diff is collapsed.
This diff is collapsed.
......@@ -654,7 +654,7 @@ check_connections(THD *thd)
if (user)
strmake(tmp_user,user,USERNAME_LENGTH);
tmp_db[0]=0;
tmp_db[0]=0;
if (db)
strmake(tmp_db,db,NAME_LEN);
......
This diff is collapsed.
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