0008-gcc7.patch 898 B

123456789101112131415161718192021222324
  1. Fix gcc7 compile
  2. mysql.cc: In function 'void build_completion_hash(bool, bool)':
  3. mysql.cc:2687:37: error: invalid conversion from 'char' to 'char*' [-fpermissive]
  4. field_names[i][num_fields*2]= '\0';
  5. ^~~~
  6. Patch was partly backported from upstream commit:
  7. https://github.com/mysql/mysql-server/commit/ae21683d980d5fe9e39bd0193827ea3604256eb9
  8. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  9. diff -uNr mysql-5.1.73.org/client/mysql.cc mysql-5.1.73/client/mysql.cc
  10. --- mysql-5.1.73.org/client/mysql.cc 2013-11-04 19:52:27.000000000 +0100
  11. +++ mysql-5.1.73/client/mysql.cc 2017-05-13 19:52:10.125101101 +0200
  12. @@ -2684,7 +2684,7 @@
  13. mysql_free_result(fields);
  14. break;
  15. }
  16. - field_names[i][num_fields*2]= '\0';
  17. + field_names[i][num_fields*2]= NULL;
  18. j=0;
  19. while ((sql_field=mysql_fetch_field(fields)))
  20. {