mirror of
https://github.com/MariaDB/server.git
synced 2026-05-10 09:04:29 +02:00
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into neptunus.(none):/home/msvensson/mysql/bug9626
This commit is contained in:
commit
a996abc594
14 changed files with 197 additions and 185 deletions
|
|
@ -985,16 +985,13 @@ static int fix_unique_index_attr_order(NDB_INDEX_DATA &data,
|
|||
for (unsigned i= 0; key_part != end; key_part++, i++)
|
||||
{
|
||||
const char *field_name= key_part->field->field_name;
|
||||
unsigned name_sz= strlen(field_name);
|
||||
if (name_sz >= NDB_MAX_ATTR_NAME_SIZE)
|
||||
name_sz= NDB_MAX_ATTR_NAME_SIZE-1;
|
||||
#ifndef DBUG_OFF
|
||||
data.unique_index_attrid_map[i]= 255;
|
||||
#endif
|
||||
for (unsigned j= 0; j < sz; j++)
|
||||
{
|
||||
const NDBCOL *c= index->getColumn(j);
|
||||
if (strncmp(field_name, c->getName(), name_sz) == 0)
|
||||
if (strcmp(field_name, c->getName()) == 0)
|
||||
{
|
||||
data.unique_index_attrid_map[i]= j;
|
||||
break;
|
||||
|
|
@ -3545,12 +3542,7 @@ static int create_ndb_column(NDBCOL &col,
|
|||
HA_CREATE_INFO *info)
|
||||
{
|
||||
// Set name
|
||||
{
|
||||
char truncated_field_name[NDB_MAX_ATTR_NAME_SIZE];
|
||||
strnmov(truncated_field_name,field->field_name,sizeof(truncated_field_name));
|
||||
truncated_field_name[sizeof(truncated_field_name)-1]= '\0';
|
||||
col.setName(truncated_field_name);
|
||||
}
|
||||
col.setName(field->field_name);
|
||||
// Get char set
|
||||
CHARSET_INFO *cs= field->charset();
|
||||
// Set type and sizes
|
||||
|
|
@ -4040,12 +4032,7 @@ int ha_ndbcluster::create_index(const char *name,
|
|||
{
|
||||
Field *field= key_part->field;
|
||||
DBUG_PRINT("info", ("attr: %s", field->field_name));
|
||||
{
|
||||
char truncated_field_name[NDB_MAX_ATTR_NAME_SIZE];
|
||||
strnmov(truncated_field_name,field->field_name,sizeof(truncated_field_name));
|
||||
truncated_field_name[sizeof(truncated_field_name)-1]= '\0';
|
||||
ndb_index.addColumnName(truncated_field_name);
|
||||
}
|
||||
ndb_index.addColumnName(field->field_name);
|
||||
}
|
||||
|
||||
if (dict->createIndex(ndb_index))
|
||||
|
|
@ -5507,7 +5494,8 @@ ndb_get_table_statistics(Ndb* ndb, const char * table,
|
|||
DBUG_RETURN(0);
|
||||
} while(0);
|
||||
|
||||
ndb->closeTransaction(pTrans);
|
||||
if (pTrans)
|
||||
ndb->closeTransaction(pTrans);
|
||||
DBUG_PRINT("exit", ("failed"));
|
||||
DBUG_RETURN(-1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -713,7 +713,8 @@ SQL_SELECT::~SQL_SELECT()
|
|||
|
||||
QUICK_SELECT_I::QUICK_SELECT_I()
|
||||
:max_used_key_length(0),
|
||||
used_key_parts(0)
|
||||
used_key_parts(0),
|
||||
records(0)
|
||||
{}
|
||||
|
||||
QUICK_RANGE_SELECT::QUICK_RANGE_SELECT(THD *thd, TABLE *table, uint key_nr,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue