|
11 | 11 |
|
12 | 12 | You should have received a copy of the GNU General Public License |
13 | 13 | along with this program; if not, write to the Free Software |
14 | | -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ |
| 14 | + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ |
15 | 15 |
|
16 | 16 | /** |
17 | 17 | @file ha_connect.cc |
@@ -266,7 +266,7 @@ bool Force_Bson(void); |
266 | 266 | size_t GetWorkSize(void); |
267 | 267 | void SetWorkSize(size_t); |
268 | 268 | extern "C" const char *msglang(void); |
269 | | - |
| 269 | +static char *strz(PGLOBAL g, LEX_CSTRING &ls); |
270 | 270 | static void PopUser(PCONNECT xp); |
271 | 271 | static PCONNECT GetUser(THD *thd, PCONNECT xp); |
272 | 272 | static PGLOBAL GetPlug(THD *thd, PCONNECT& lxp); |
@@ -1301,10 +1301,10 @@ PCSZ GetStringTableOption(PGLOBAL g, PTOS options, PCSZ opname, PCSZ sdef) |
1301 | 1301 | opval= options->filter; |
1302 | 1302 | else if (!stricmp(opname, "Data_charset")) |
1303 | 1303 | opval= options->data_charset; |
1304 | | -else if (!stricmp(opname, "Http") || !stricmp(opname, "URL")) |
1305 | | -opval= options->http; |
1306 | | -else if (!stricmp(opname, "Uri")) |
1307 | | -opval= options->uri; |
| 1304 | + else if (!stricmp(opname, "Http") || !stricmp(opname, "URL")) |
| 1305 | + opval= options->http; |
| 1306 | + else if (!stricmp(opname, "Uri")) |
| 1307 | + opval= options->uri; |
1308 | 1308 |
|
1309 | 1309 | if (!opval && options->oplist) |
1310 | 1310 | opval= GetListOption(g, opname, options->oplist); |
@@ -5642,7 +5642,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd, |
5642 | 5642 | String sql(buf, sizeof(buf), system_charset_info); |
5643 | 5643 |
|
5644 | 5644 | sql.copy(STRING_WITH_LEN("CREATE TABLE whatever ("), system_charset_info); |
5645 | | -user= host= pwd= tbl= src= col= ocl= pic= fcl= skc= rnk= zfn= NULL; |
| 5645 | + user= host= pwd= tbl= src= col= ocl= pic= fcl= skc= rnk= zfn= NULL; |
5646 | 5646 | dsn= url= NULL; |
5647 | 5647 |
|
5648 | 5648 | // Get the useful create options |
@@ -5694,7 +5694,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd, |
5694 | 5694 | #if defined(ZIP_SUPPORT) |
5695 | 5695 | zfn= GetListOption(g, "Zipfile", topt->oplist, NULL); |
5696 | 5696 | #endif // ZIP_SUPPORT |
5697 | | -} else { |
| 5697 | + } else { |
5698 | 5698 | host= "localhost"; |
5699 | 5699 | user= ((ttp == TAB_ODBC || ttp == TAB_JDBC) ? NULL : "root"); |
5700 | 5700 | } // endif option_list |
@@ -5831,17 +5831,17 @@ static int connect_assisted_discovery(handlerton *, THD* thd, |
5831 | 5831 | PJDBCDEF jdef= new(g) JDBCDEF(); |
5832 | 5832 |
|
5833 | 5833 | jdef->SetName(create_info->alias.str); |
5834 | | -sjp = (PJPARM)PlugSubAlloc(g, NULL, sizeof(JDBCPARM)); |
5835 | | -sjp->Driver = driver; |
5836 | | -//sjp->Properties = prop; |
5837 | | -sjp->Fsize = 0; |
5838 | | -sjp->Scrollable = false; |
5839 | | - |
5840 | | -if ((rc = jdef->ParseURL(g, url, false)) == RC_OK) { |
5841 | | -sjp->Url = url; |
5842 | | -sjp->User = (char*)user; |
5843 | | -sjp->Pwd = (char*)pwd; |
5844 | | -ok = true; |
| 5834 | +sjp= (PJPARM)PlugSubAlloc(g, NULL, sizeof(JDBCPARM)); |
| 5835 | +sjp->Driver= driver; |
| 5836 | +//sjp->Properties= prop; |
| 5837 | +sjp->Fsize= 0; |
| 5838 | +sjp->Scrollable= false; |
| 5839 | + |
| 5840 | +if ((rc= jdef->ParseURL(g, url, false)) == RC_OK) { |
| 5841 | +sjp->Url= url; |
| 5842 | +sjp->User= (char*)user; |
| 5843 | +sjp->Pwd= (char*)pwd; |
| 5844 | +ok= true; |
5845 | 5845 | } else if (rc == RC_NF) { |
5846 | 5846 | if (jdef->GetTabname()) |
5847 | 5847 | tab= (char*)jdef->GetTabname(); |
@@ -5955,11 +5955,11 @@ static int connect_assisted_discovery(handlerton *, THD* thd, |
5955 | 5955 | break; |
5956 | 5956 | #endif // JAVA_SUPPORT |
5957 | 5957 | #if defined(REST_SUPPORT) |
5958 | | -case TAB_REST: |
5959 | | -if (!topt->http) |
5960 | | -strcpy(g->Message, "Missing REST HTTP option"); |
5961 | | -else |
5962 | | -ok = true; |
| 5958 | + case TAB_REST: |
| 5959 | + if (!topt->http) |
| 5960 | + sprintf(g->Message, "Missing %s HTTP address", topt->type); |
| 5961 | + else |
| 5962 | + ok= true; |
5963 | 5963 |
|
5964 | 5964 | break; |
5965 | 5965 | #endif // REST_SUPPORT |
@@ -6123,11 +6123,11 @@ static int connect_assisted_discovery(handlerton *, THD* thd, |
6123 | 6123 | break; |
6124 | 6124 | #endif // LIBXML2_SUPPORT || DOMDOC_SUPPORT |
6125 | 6125 | #if defined(REST_SUPPORT) |
6126 | | -case TAB_REST: |
6127 | | -qrp = RESTColumns(g, topt, tab, (char *)db, fnc == FNC_COL); |
6128 | | -break; |
| 6126 | + case TAB_REST: |
| 6127 | + qrp= RESTColumns(g, topt, tab, (char *)db, fnc == FNC_COL); |
| 6128 | + break; |
6129 | 6129 | #endif // REST_SUPPORT |
6130 | | -case TAB_OEM: |
| 6130 | + case TAB_OEM: |
6131 | 6131 | qrp= OEMColumns(g, topt, tab, (char*)db, fnc == FNC_COL); |
6132 | 6132 | break; |
6133 | 6133 | default: |
@@ -6444,7 +6444,7 @@ int ha_connect::create(const char *name, TABLE *table_arg, |
6444 | 6444 | TABTYPE type; |
6445 | 6445 | TABLE *st= table; // Probably unuseful |
6446 | 6446 | THD *thd= ha_thd(); |
6447 | | - LEX_CSTRING cnc = table_arg->s->connect_string; |
| 6447 | + LEX_CSTRING cnc= table_arg->s->connect_string; |
6448 | 6448 | #if defined(WITH_PARTITION_STORAGE_ENGINE) |
6449 | 6449 | partition_info *part_info= table_arg->part_info; |
6450 | 6450 | #else// !WITH_PARTITION_STORAGE_ENGINE |
|
0 commit comments