List:Commits« Previous MessageNext Message »
From:Davi Arnaut Date:July 1 2009 2:04am
Subject:Re: bzr commit into mysql-5.1-bugteam branch (davi:2988) Bug#21704
View as plain text  
On 6/30/09 8:08 PM, Konstantin Osipov wrote:

[..]

>>
>> +	/* Check if a column referenced by a foreign key was renamed.
>> +	There is no mechanism for updating InnoDB foreign key definitions. */
>> +	if (referenced_by_foreign_key()) {
>
> What about the case when the table is a child in the foreign
> key relationship?

Wasn't addressed, will update the patch.

>> +		dict_foreign_t* foreign;
>> +		row_mysql_lock_data_dictionary(prebuilt->trx);
>
> Why do you think this is necessary?

Being over-conservative to avoid deadlocks if there is any active latch.

>> +		foreign = UT_LIST_GET_FIRST(prebuilt->table->referenced_list);
>> +		while (foreign != NULL) {
>> +			if (foreign_referenced_is_renamed(table, foreign))
>> +				break;
>
> Yuck. We look directly into table->field flags, rather than
> looking at some alter-specific info. But what can you do.
>
> Seems to be the only possible approach.

Yep.

>> +			foreign = UT_LIST_GET_NEXT(referenced_list, foreign);
>> +		}
>> +		row_mysql_unlock_data_dictionary(prebuilt->trx);
>> +		if (foreign != NULL) {
>> +
>> +			return COMPATIBLE_DATA_NO;
>> +		}
>> +	}
>
> Please send your patch over to InnoDB engineers, Lars should know how to
> contact them.
>

Done already. Sent to InnoDB with CC to Sanjay.
Thread
bzr commit into mysql-5.1-bugteam branch (davi:2988) Bug#21704Davi Arnaut30 Jun
  • Re: bzr commit into mysql-5.1-bugteam branch (davi:2988) Bug#21704Konstantin Osipov1 Jul
    • Re: bzr commit into mysql-5.1-bugteam branch (davi:2988) Bug#21704Davi Arnaut1 Jul
      • Re: bzr commit into mysql-5.1-bugteam branch (davi:2988) Bug#21704Konstantin Osipov1 Jul
  • Re: bzr commit into mysql-5.1-bugteam branch (davi:2988) Bug#21704Konstantin Osipov1 Jul