[MDEV-9603] [PATCH] Build failure in Connect Created: 2016-02-21  Updated: 2016-03-19  Resolved: 2016-03-19

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Connect
Affects Version/s: 10.0.24
Fix Version/s: 10.0.25, 10.1.14

Type: Bug Priority: Major
Reporter: Bernard Spil Assignee: Olivier Bertrand
Resolution: Fixed Votes: 0
Labels: None
Environment:

FreeBSD 10.2
clang 3.4



 Description   

Build failure in `storage/connect/tabmysql.cpp`

This is a clang specific error where we're passing a string constant where a variable of type `PSZ` is expected

Fix:

--- storage/connect/tabmysql.cpp.orig   2016-02-17 21:59:55.000000000 +0100
+++ storage/connect/tabmysql.cpp        2016-02-21 13:26:47.706891856 +0100
@@ -334,7 +334,7 @@ bool MYSQLDEF::DefineAM(PGLOBAL g, LPCST
     Delayed = !!GetIntCatInfo("Delayed", 0);
   } else {
     // MYSQL access from a PROXY table
-    Database = GetStringCatInfo(g, "Database", Schema ? Schema : "*");
+    Database = GetStringCatInfo(g, "Database", Schema ? Schema : (PSZ)"*");
     Isview = GetBoolCatInfo("View", false);
 
     // We must get other connection parms from the calling table

cast to type `PSZ`



 Comments   
Comment by Thong Kuah [ 2016-03-19 ]

This occurs on OSX too :

kuah-air:homebrew-versions kuahyeow$ clang --version
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.3.0
Thread model: posix

Generated at Thu Feb 08 07:35:56 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.