Skip to content

Commit

Permalink
Merge pull request #182 from Arkshine/fix/mysql-crash-amtl
Browse files Browse the repository at this point in the history
Fix a mysql crash after CString -> ke::AString conversion
  • Loading branch information
Arkshine committed Jan 18, 2015
2 parents 2e64e9f + c3e0753 commit 252f191
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dlls/mysqlx/threading.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,8 @@ void AtomicResult::CopyFrom(IResultSet *rs)
{
*m_Table[i] = rs->FieldNumToName(i);
} else {
m_Table[i] = new ke::AString(rs->FieldNumToName(i));
const char* string = rs->FieldNumToName(i);
m_Table[i] = new ke::AString(string ? string : "");
}
}

Expand All @@ -582,7 +583,8 @@ void AtomicResult::CopyFrom(IResultSet *rs)
{
*m_Table[idx] = row->GetString(i);
} else {
m_Table[idx] = new ke::AString(row->GetString(i));
const char* string = row->GetString(i);
m_Table[idx] = new ke::AString(string ? string : "");
}
}
rs->NextRow();
Expand Down

0 comments on commit 252f191

Please sign in to comment.