~laurynas-biveinis/percona-server/bug810272

  • Committer: Laurynas Biveinis
  • Date: 2011-11-18 08:57:06 UTC
  • Revision ID: laurynas.biveinis@percona.com-20111118085706-jlupkcpw7cjclcph
Fix bug 810272 (bogus snprintf return value checking and compilation
warning).

The warning is 
sql/query_response_time.cc:147: error: comparison of unsigned
expression < 0 is always false
and it indicates that the if clause is dead code, because of the wrong
assumption that snprintf returns a negative value on buffer truncate
(and the old code stores that value in an unsigned type anyway).

The fix:
- Drops buffer overflow check and returns the truncated buffer instead.
- Replaces snprintf with my_snprintf.
- Removes pre- and post-snprintf buffer writes.
- Removes now-unused arguments of print_time, updates callers and
  makes it static.
- Removes STRING_OVERFLOW, QRT_STRING_OVERFLOW, changes
  QRT_POSITIVE_POWER_FILLER to "", simplifies QRT_TIME_STRING_LENGTH
  and QRT_TOTAL_STRING_LENGTH.
- Re-records the testcases.
Filename Latest Rev Last Changed Committer Comment Size
..
build 33.3.1 13 years ago Aleksandr Kuzminsky RPM .spec file is added to build Percona Server ba Diff
doc 140.10.3 12 years ago Rodrigo Gadea Initial commit of the new Percona Server 5.5 docum Diff
HandlerSocket-Plugin-for-MySQL 33.3.1 13 years ago Aleksandr Kuzminsky RPM .spec file is added to build Percona Server ba Diff
patches 140.4.1 12 years ago Stewart Smith move to using quilt for patch management. also has Diff
python-for-subunit2junitxml 175.1.1 12 years ago Stewart Smith add subunit2junitxml and needed libraries Diff
UDF 33.3.1 13 years ago Aleksandr Kuzminsky RPM .spec file is added to build Percona Server ba Diff
.bzrignore 140.10.3 12 years ago Rodrigo Gadea Initial commit of the new Percona Server 5.5 docum 6 bytes Diff Download File
File apply_patches 140.4.3 12 years ago Oleg Tsarev 1. Makefile: * add symlink to quiltrc to $(PERC 273 bytes Diff Download File
COPYING.innodb-deadlock-count-patch 10 13 years ago Oleg Tsarev propogate Oleg's patches 1.6 KB Diff Download File
COPYING.show_temp_51 10 13 years ago Oleg Tsarev propogate Oleg's patches 1.6 KB Diff Download File
File handlersocket.patch 88.2.28 13 years ago Ignacio Nin Include Maatkit UDFs and HandlerSocket Include th 1.4 KB Diff Download File
lrusort.py 11 13 years ago Oleg Tsarev return back lrusort.py 696 bytes Diff Download File
Makefile 195 12 years ago Alexey Kopytov Merge release-5.5.16-22.0 after tagging the top re 3.9 KB Diff Download File
File normalize_patches 140.4.3 12 years ago Oleg Tsarev 1. Makefile: * add symlink to quiltrc to $(PERC 141 bytes Diff Download File
quiltrc 140.4.3 12 years ago Oleg Tsarev 1. Makefile: * add symlink to quiltrc to $(PERC 198 bytes Diff Download File
README.HandlerSocket 88.2.18 13 years ago Ignacio Nin Update HandlerSocket Update HandlerSocket to comm 429 bytes Diff Download File
File subunit2junitxml 175.1.1 12 years ago Stewart Smith add subunit2junitxml and needed libraries 2.2 KB Diff Download File
File uninstall_tests.sh 10 13 years ago Oleg Tsarev propogate Oleg's patches 629 bytes Diff Download File