diff options
author | unknown <monty@mishka.local> | 2005-08-22 01:13:37 +0300 |
---|---|---|
committer | unknown <monty@mishka.local> | 2005-08-22 01:13:37 +0300 |
commit | 72340a481a4706674780b898b81a1850a6654d3d (patch) | |
tree | 7f70f119d33fc85a848fcbc2acd1eba3d91b6e17 /include/my_global.h | |
parent | a1820ab1caa44ebde992b587cb561dc38da4c9c6 (diff) | |
download | mariadb-git-72340a481a4706674780b898b81a1850a6654d3d.tar.gz |
Cleanup during review of new pushed code
include/my_global.h:
Safer macros to avoid possible overflows
sql/item_cmpfunc.cc:
Simple optimization
sql/sp_head.cc:
Indentation fixes
Remove not needed "else" levels
Added error checking for 'new'
Simpler reseting of thd->spcont in execute_procedure
sql/sql_base.cc:
Faster new
sql/sql_lex.cc:
Use 'TRUE' instead of 'true'
sql/sql_parse.cc:
Faster new
sql/sql_view.cc:
No need to set 'tables' as it's not used
sql/table.cc:
Simpler DBUG_ASSERT()
Diffstat (limited to 'include/my_global.h')
-rw-r--r-- | include/my_global.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/my_global.h b/include/my_global.h index 2546dde754d..95d0b983b72 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -933,10 +933,10 @@ typedef char bool; /* Ordinary boolean values 0 1 */ (ABSTIME).ts_nsec=0; \ } #define set_timespec_nsec(ABSTIME,NSEC) \ -{\ - ulonglong now= my_getsystime(); \ - (ABSTIME).ts_sec= (now / ULL(10000000)) + (NSEC / ULL(1000000000)); \ - (ABSTIME).ts_nsec= (now % ULL(10000000)) * 100 + (NSEC % ULL(1000000000)); \ +{ \ + ulonglong now= my_getsystime() + (NSEC/100); \ + (ABSTIME).ts_sec= (now / ULL(10000000)); \ + (ABSTIME).ts_nsec= (now % ULL(10000000) * 100 + ((NSEC) % 100)); \ } #else #define set_timespec(ABSTIME,SEC) \ @@ -948,9 +948,9 @@ typedef char bool; /* Ordinary boolean values 0 1 */ } #define set_timespec_nsec(ABSTIME,NSEC) \ {\ - ulonglong now= my_getsystime(); \ - (ABSTIME).tv_sec= (now / ULL(10000000)) + (NSEC / ULL(1000000000)); \ - (ABSTIME).tv_nsec= (now % ULL(10000000)) * 100 + (NSEC % ULL(1000000000)); \ + ulonglong now= my_getsystime() + (NSEC/100); \ + (ABSTIME).tv_sec= (now / ULL(10000000)); \ + (ABSTIME).tv_nsec= (now % ULL(10000000) * 100 + ((NSEC) % 100)); \ } #endif /* HAVE_TIMESPEC_TS_SEC */ #endif /* set_timespec */ |