Commit 83a04be8 authored by Souradeep Saha's avatar Souradeep Saha Committed by Daniel Black

Fix Various Typos

Fix various typos, in comments and DEBUG statements, and code changes
are non-functional.

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer Amazon Web
Services, Inc.
parent 4a158ec1
......@@ -417,7 +417,7 @@ int main(int argc,char *argv[])
is given a t!=0, we get an endless loop, or n iterations if --count=n
was given an n!=0. If --sleep wasn't given, we get one iteration.
To wit, --wait loops the connection-attempts, while --sleep loops
To wait, --wait loops the connection-attempts, while --sleep loops
the command execution (endlessly if no --count is given).
*/
......
......@@ -5842,7 +5842,7 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
free_root(&glob_root, MYF(0));
}
maybe_die(EX_ILLEGAL_TABLE, "Couldn't find table: \"%s\"", *table_names);
/* We shall countinue here, if --force was given */
/* We shall continue here, if --force was given */
}
}
end= pos;
......@@ -5863,7 +5863,7 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
free_root(&glob_root, MYF(0));
}
DB_error(mysql, "when doing LOCK TABLES");
/* We shall countinue here, if --force was given */
/* We shall continue here, if --force was given */
}
}
dynstr_free(&lock_tables_query);
......@@ -5875,7 +5875,7 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
free_root(&glob_root, MYF(0));
DB_error(mysql, "when doing refresh");
}
/* We shall countinue here, if --force was given */
/* We shall continue here, if --force was given */
else
verbose_msg("-- dump_selected_tables : logs flushed successfully!\n");
}
......
......@@ -414,7 +414,7 @@ static void lock_table(MYSQL *mysql, int tablecount, char **raw_tablename)
dynstr_append(&query, " WRITE,");
}
if (mysql_real_query(mysql, query.str, (ulong)query.length-1))
db_error(mysql); /* We shall countinue here, if --force was given */
db_error(mysql); /* We shall continue here, if --force was given */
}
......@@ -612,7 +612,7 @@ pthread_handler_t worker_thread(void *arg)
if (mysql_query(mysql, "/*!40101 set @@character_set_database=binary */;"))
{
db_error(mysql); /* We shall countinue here, if --force was given */
db_error(mysql); /* We shall continue here, if --force was given */
goto error;
}
......@@ -736,12 +736,12 @@ int main(int argc, char **argv)
if (!(mysql= db_connect(current_host,current_db,current_user,opt_password)))
{
free_defaults(argv_to_free);
return(1); /* purecov: deadcode */
return(1); /* purecov: dead code */
}
if (mysql_query(mysql, "/*!40101 set @@character_set_database=binary */;"))
{
db_error(mysql); /* We shall countinue here, if --force was given */
db_error(mysql); /* We shall continue here, if --force was given */
return(1);
}
......
......@@ -21,7 +21,7 @@
The differences for the two cases are:
- Things that only works for the client:
- Trying to automaticly determinate user name if not supplied to
- Trying to automatically determinate user name if not supplied to
mysql_real_connect()
- Support for reading local file with LOAD DATA LOCAL
- SHARED memory handling
......@@ -30,7 +30,7 @@
- Things that only works for the server
- Alarm handling on connect
In all other cases, the code should be idential for the client and
In all other cases, the code should be identical for the client and
server.
*/
......@@ -1457,7 +1457,7 @@ mysql_init(MYSQL *mysql)
mysql_reconnect()).
This is a change: < 5.0.3 mysql->reconnect was set to 1 by default.
How this change impacts existing apps:
- existing apps which relyed on the default will see a behaviour change;
- existing apps which relied on the default will see a behaviour change;
they will have to set reconnect=1 after mysql_real_connect().
- existing apps which explicitly asked for reconnection (the only way they
could do it was by setting mysql.reconnect to 1 after mysql_real_connect())
......@@ -1936,7 +1936,7 @@ typedef struct {
/*
Write 1-8 bytes of string length header infromation to dest depending on
Write 1-8 bytes of string length header information to dest depending on
value of src_len, then copy src_len bytes from src to dest.
@param dest Destination buffer of size src_len+8
......@@ -2217,7 +2217,7 @@ static int send_client_reply_packet(MCPVIO_EXT *mpvio,
}
#endif /* HAVE_OPENSSL */
DBUG_PRINT("info",("Server version = '%s' capabilites: %lu status: %u client_flag: %lu",
DBUG_PRINT("info",("Server version = '%s' capabilities: %lu status: %u client_flag: %lu",
mysql->server_version, mysql->server_capabilities,
mysql->server_status, mysql->client_flag));
......@@ -2354,7 +2354,7 @@ static int client_mpvio_read_packet(struct st_plugin_vio *mpv, uchar **buf)
to send data to the server.
It transparently wraps the data into a change user or authentication
handshake packet, if neccessary.
handshake packet, if necessary.
*/
static int client_mpvio_write_packet(struct st_plugin_vio *mpv,
const uchar *pkt, int pkt_len)
......@@ -3830,7 +3830,7 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg)
mysql->options.compress= 1; /* Remember for connect */
mysql->options.client_flag|= CLIENT_COMPRESS;
break;
case MYSQL_OPT_NAMED_PIPE: /* This option is depricated */
case MYSQL_OPT_NAMED_PIPE: /* This option is deprecated */
mysql->options.protocol=MYSQL_PROTOCOL_PIPE; /* Force named pipe */
break;
case MYSQL_OPT_LOCAL_INFILE: /* Allow LOAD DATA LOCAL ?*/
......
......@@ -475,7 +475,7 @@ str_to_DDhhmmssff_internal(my_bool neg, const char *str, size_t length,
DESCRIPTION
At least the following formats are recogniced (based on number of digits)
At least the following formats are recognized (based on number of digits)
YYMMDD, YYYYMMDD, YYMMDDHHMMSS, YYYYMMDDHHMMSS
YY-MM-DD, YYYY-MM-DD, YY-MM-DD HH.MM.SS
YYYYMMDDTHHMMSS where T is a the character T (ISO8601)
......@@ -1223,7 +1223,7 @@ long calc_daynr(uint year,uint month,uint day)
/*
Convert time in MYSQL_TIME representation in system time zone to its
my_time_t form (number of seconds in UTC since begginning of Unix Epoch).
my_time_t form (number of seconds in UTC since beginning of Unix Epoch).
SYNOPSIS
my_system_gmt_sec()
......@@ -1291,7 +1291,7 @@ my_system_gmt_sec(const MYSQL_TIME *t_src, long *my_timezone, uint *error_code)
two days earlier, and then add these days to the final value.
The same trick is done for the values close to 0 in time_t
representation for platfroms with unsigned time_t (QNX).
representation for platforms with unsigned time_t (QNX).
To be more verbose, here is a sample (extracted from the code below):
(calc_daynr(2038, 1, 19) - (long) days_at_timestart)*86400L + 4*3600L
......@@ -1303,9 +1303,9 @@ my_system_gmt_sec(const MYSQL_TIME *t_src, long *my_timezone, uint *error_code)
will give -3600.
On some platforms, (E.g. on QNX) time_t is unsigned and localtime(-3600)
wil give us a date around 2106 year. Which is no good.
will give us a date around 2106 year. Which is no good.
Theoreticaly, there could be problems with the latter conversion:
Theoretically, there could be problems with the latter conversion:
there are at least two timezones, which had time switches near 1 Jan
of 1970 (because of political reasons). These are America/Hermosillo and
America/Mazatlan time zones. They changed their offset on
......@@ -1335,7 +1335,7 @@ my_system_gmt_sec(const MYSQL_TIME *t_src, long *my_timezone, uint *error_code)
else
{
/*
We can get 0 in time_t representaion only on 1969, 31 of Dec or on
We can get 0 in time_t representation only on 1969, 31 of Dec or on
1970, 1 of Jan. For both dates we use shift, which is added
to t->day in order to step out a bit from the border.
This is required for platforms, where time_t is unsigned.
......@@ -1430,9 +1430,9 @@ my_system_gmt_sec(const MYSQL_TIME *t_src, long *my_timezone, uint *error_code)
First check will pass for platforms with signed time_t.
instruction above (tmp+= shift*86400L) could exceed
MAX_INT32 (== TIMESTAMP_MAX_VALUE) and overflow will happen.
So, tmp < TIMESTAMP_MIN_VALUE will be triggered. On platfroms
So, tmp < TIMESTAMP_MIN_VALUE will be triggered. On platforms
with unsigned time_t tmp+= shift*86400L might result in a number,
larger then TIMESTAMP_MAX_VALUE, so another check will work.
larger than TIMESTAMP_MAX_VALUE, so another check will work.
*/
if (!IS_TIME_T_VALID_FOR_TIMESTAMP(tmp))
{
......@@ -1545,8 +1545,8 @@ static inline char* fmt_number2(uint8 val, char *out)
- 0.225 sec (current)
- 0.219 sec (array)
It demonstrated an additional 3% performance imrovement one these queries.
However, as the array size is too huge, we afraid that it will flush data
It demonstrated an additional 3% performance improvement one these queries.
However, as the array size is too huge, we are afraid that it will flush data
from the CPU memory cache, which under real load may affect negatively.
Let's keep using the fmt_number4() version with division and remainder
......
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