Commit 8a5904ae authored by MySQL Build Team's avatar MySQL Build Team

Type change: "fk->name" is no "const char *" any more, rather a "LEX_STRING".

To access its string part, the ".str" element must be accessed.

This change was missing in "storage/ibmdb2i/db2i_constraints.cc", add it now.
parent 0487a1a0
...@@ -102,7 +102,7 @@ int ha_ibmdb2i::buildDB2ConstraintString(LEX* lex, ...@@ -102,7 +102,7 @@ int ha_ibmdb2i::buildDB2ConstraintString(LEX* lex,
Foreign_key* fk = (Foreign_key*)curKey; Foreign_key* fk = (Foreign_key*)curKey;
char db2LibName[MAX_DB2_SCHEMANAME_LENGTH+1]; char db2LibName[MAX_DB2_SCHEMANAME_LENGTH+1];
if (fk->name) if (fk->name.str)
{ {
char db2FKName[MAX_DB2_FILENAME_LENGTH+1]; char db2FKName[MAX_DB2_FILENAME_LENGTH+1];
appendHere.append(STRING_WITH_LEN("CONSTRAINT ")); appendHere.append(STRING_WITH_LEN("CONSTRAINT "));
...@@ -120,7 +120,7 @@ int ha_ibmdb2i::buildDB2ConstraintString(LEX* lex, ...@@ -120,7 +120,7 @@ int ha_ibmdb2i::buildDB2ConstraintString(LEX* lex,
appendHere.append('.'); appendHere.append('.');
convertMySQLNameToDB2Name(fk->name, db2FKName, sizeof(db2FKName)); convertMySQLNameToDB2Name(fk->name.str, db2FKName, sizeof(db2FKName));
appendHere.append(db2FKName); appendHere.append(db2FKName);
} }
...@@ -139,7 +139,7 @@ int ha_ibmdb2i::buildDB2ConstraintString(LEX* lex, ...@@ -139,7 +139,7 @@ int ha_ibmdb2i::buildDB2ConstraintString(LEX* lex,
} }
firstTime = false; firstTime = false;
convertMySQLNameToDB2Name(curColumn->field_name, colName, sizeof(colName)); convertMySQLNameToDB2Name(curColumn->field_name.str, colName, sizeof(colName));
appendHere.append(colName); appendHere.append(colName);
// DB2 requires that the sort sequence on the child table match the parent table's // DB2 requires that the sort sequence on the child table match the parent table's
...@@ -148,7 +148,7 @@ int ha_ibmdb2i::buildDB2ConstraintString(LEX* lex, ...@@ -148,7 +148,7 @@ int ha_ibmdb2i::buildDB2ConstraintString(LEX* lex,
Field** field = fields; Field** field = fields;
do do
{ {
if (strcmp((*field)->field_name, curColumn->field_name) == 0) if (strcmp((*field)->field_name, curColumn->field_name.str) == 0)
{ {
int rc = updateAssociatedSortSequence((*field)->charset(), int rc = updateAssociatedSortSequence((*field)->charset(),
fileSortSequenceType, fileSortSequenceType,
...@@ -199,7 +199,7 @@ int ha_ibmdb2i::buildDB2ConstraintString(LEX* lex, ...@@ -199,7 +199,7 @@ int ha_ibmdb2i::buildDB2ConstraintString(LEX* lex,
} }
firstTime = false; firstTime = false;
convertMySQLNameToDB2Name(curRef->field_name, colName, sizeof(colName)); convertMySQLNameToDB2Name(curRef->field_name.str, colName, sizeof(colName));
appendHere.append(colName); appendHere.append(colName);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment