diff options
author | unknown <msvensson@neptunus.(none)> | 2007-02-06 15:46:17 +0100 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2007-02-06 15:46:17 +0100 |
commit | 8c6fe3587cc534bf084181d6c2308edfab913190 (patch) | |
tree | fc2a41854c7dea15d518e7c0aeaed54f30988795 /sql-common | |
parent | aff6c2e72318b959899b5257cdc08b8f0d4f71bb (diff) | |
parent | c52165de13ca62c2a596ea05c01e07807432d605 (diff) | |
download | mariadb-git-8c6fe3587cc534bf084181d6c2308edfab913190.tar.gz |
Merge neptunus.(none):/home/msvensson/mysql/mysql-5.1
into neptunus.(none):/home/msvensson/mysql/mysql-5.1-maint
BitKeeper/etc/ignore:
auto-union
Makefile.am:
Auto merged
cmd-line-utils/readline/display.c:
Auto merged
configure.in:
Auto merged
extra/yassl/include/buffer.hpp:
Auto merged
extra/yassl/include/crypto_wrapper.hpp:
Auto merged
extra/yassl/include/yassl_imp.hpp:
Auto merged
extra/yassl/include/yassl_int.hpp:
Auto merged
extra/yassl/src/crypto_wrapper.cpp:
Auto merged
extra/yassl/taocrypt/include/algebra.hpp:
Auto merged
extra/yassl/taocrypt/include/des.hpp:
Auto merged
extra/yassl/taocrypt/include/hash.hpp:
Auto merged
extra/yassl/taocrypt/include/hmac.hpp:
Auto merged
extra/yassl/taocrypt/include/modarith.hpp:
Auto merged
extra/yassl/taocrypt/include/modes.hpp:
Auto merged
extra/yassl/taocrypt/include/rsa.hpp:
Auto merged
extra/yassl/taocrypt/include/type_traits.hpp:
Auto merged
extra/yassl/taocrypt/mySTL/list.hpp:
Auto merged
extra/yassl/taocrypt/src/aes.cpp:
Auto merged
extra/yassl/taocrypt/src/algebra.cpp:
Auto merged
extra/yassl/taocrypt/src/asn.cpp:
Auto merged
extra/yassl/testsuite/testsuite.cpp:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/mysqltest.result:
Auto merged
mysql-test/t/mysqltest.test:
Auto merged
mysys/default.c:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/net_serv.cc:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql-common/client.c:
Auto merged
sql/sql_select.cc:
Auto merged
extra/yassl/taocrypt/test/test.cpp:
Manual merge
mysql-test/r/grant.result:
Manual merge
mysql-test/r/select.result:
Manual merge
mysql-test/t/grant.test:
Manual merge
mysql-test/t/select.test:
Manual merge
sql/field.h:
Manual merge
sql/mysqld.cc:
Manual merge
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/client.c | 6 | ||||
-rw-r--r-- | sql-common/my_time.c | 57 |
2 files changed, 32 insertions, 31 deletions
diff --git a/sql-common/client.c b/sql-common/client.c index 049ddd0e701..12a2483e54d 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -682,7 +682,7 @@ cli_advanced_command(MYSQL *mysql, enum enum_server_command command, mysql->info=0; mysql->affected_rows= ~(my_ulonglong) 0; /* - We don't want to clear the protocol buffer on COM_QUIT, beacsue if + We don't want to clear the protocol buffer on COM_QUIT, because if the previous command was a shutdown command, we may have the response for the COM_QUIT already in the communication buffer */ @@ -2370,12 +2370,12 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, { DYNAMIC_ARRAY *init_commands= mysql->options.init_commands; char **ptr= (char**)init_commands->buffer; - char **end= ptr + init_commands->elements; + char **end_command= ptr + init_commands->elements; my_bool reconnect=mysql->reconnect; mysql->reconnect=0; - for (; ptr<end; ptr++) + for (; ptr < end_command; ptr++) { MYSQL_RES *res; if (mysql_real_query(mysql,*ptr, (ulong) strlen(*ptr))) diff --git a/sql-common/my_time.c b/sql-common/my_time.c index b9b712148a0..a26e38b2123 100644 --- a/sql-common/my_time.c +++ b/sql-common/my_time.c @@ -680,24 +680,24 @@ fractional: 1 time value is invalid */ -int check_time_range(struct st_mysql_time *time, int *warning) +int check_time_range(struct st_mysql_time *my_time, int *warning) { longlong hour; - if (time->minute >= 60 || time->second >= 60) + if (my_time->minute >= 60 || my_time->second >= 60) return 1; - hour= time->hour + (24*time->day); + hour= my_time->hour + (24*my_time->day); if (hour <= TIME_MAX_HOUR && - (hour != TIME_MAX_HOUR || time->minute != TIME_MAX_MINUTE || - time->second != TIME_MAX_SECOND || !time->second_part)) + (hour != TIME_MAX_HOUR || my_time->minute != TIME_MAX_MINUTE || + my_time->second != TIME_MAX_SECOND || !my_time->second_part)) return 0; - time->day= 0; - time->hour= TIME_MAX_HOUR; - time->minute= TIME_MAX_MINUTE; - time->second= TIME_MAX_SECOND; - time->second_part= 0; + my_time->day= 0; + my_time->hour= TIME_MAX_HOUR; + my_time->minute= TIME_MAX_MINUTE; + my_time->second= TIME_MAX_SECOND; + my_time->second_part= 0; *warning|= MYSQL_TIME_WARN_OUT_OF_RANGE; return 0; } @@ -1148,22 +1148,23 @@ longlong number_to_datetime(longlong nr, MYSQL_TIME *time_res, /* Convert time value to integer in YYYYMMDDHHMMSS format */ -ulonglong TIME_to_ulonglong_datetime(const MYSQL_TIME *time) +ulonglong TIME_to_ulonglong_datetime(const MYSQL_TIME *my_time) { - return ((ulonglong) (time->year * 10000UL + - time->month * 100UL + - time->day) * ULL(1000000) + - (ulonglong) (time->hour * 10000UL + - time->minute * 100UL + - time->second)); + return ((ulonglong) (my_time->year * 10000UL + + my_time->month * 100UL + + my_time->day) * ULL(1000000) + + (ulonglong) (my_time->hour * 10000UL + + my_time->minute * 100UL + + my_time->second)); } /* Convert TIME value to integer in YYYYMMDD format */ -ulonglong TIME_to_ulonglong_date(const MYSQL_TIME *time) +ulonglong TIME_to_ulonglong_date(const MYSQL_TIME *my_time) { - return (ulonglong) (time->year * 10000UL + time->month * 100UL + time->day); + return (ulonglong) (my_time->year * 10000UL + my_time->month * 100UL + + my_time->day); } @@ -1173,11 +1174,11 @@ ulonglong TIME_to_ulonglong_date(const MYSQL_TIME *time) it's assumed that days have been converted to hours already. */ -ulonglong TIME_to_ulonglong_time(const MYSQL_TIME *time) +ulonglong TIME_to_ulonglong_time(const MYSQL_TIME *my_time) { - return (ulonglong) (time->hour * 10000UL + - time->minute * 100UL + - time->second); + return (ulonglong) (my_time->hour * 10000UL + + my_time->minute * 100UL + + my_time->second); } @@ -1201,15 +1202,15 @@ ulonglong TIME_to_ulonglong_time(const MYSQL_TIME *time) valid date either. */ -ulonglong TIME_to_ulonglong(const MYSQL_TIME *time) +ulonglong TIME_to_ulonglong(const MYSQL_TIME *my_time) { - switch (time->time_type) { + switch (my_time->time_type) { case MYSQL_TIMESTAMP_DATETIME: - return TIME_to_ulonglong_datetime(time); + return TIME_to_ulonglong_datetime(my_time); case MYSQL_TIMESTAMP_DATE: - return TIME_to_ulonglong_date(time); + return TIME_to_ulonglong_date(my_time); case MYSQL_TIMESTAMP_TIME: - return TIME_to_ulonglong_time(time); + return TIME_to_ulonglong_time(my_time); case MYSQL_TIMESTAMP_NONE: case MYSQL_TIMESTAMP_ERROR: return ULL(0); |