List:Commits« Previous MessageNext Message »
From:Jorgen Loland Date:February 15 2011 11:32am
Subject:Re: bzr commit into mysql-trunk branch (jorgen.loland:3641) Bug#11762751
Bug#11764529
View as plain text  
Hi Jon Olav,

I'll commit a new patch after Mattias has done the review as well. I have a few 
questions, though. See comments inline

On 02/15/2011 11:15 AM, Jon Olav Hauglid wrote:
>> +CREATE VIEW v1 AS SELECT * FROM t1;
>> +UPDATE v1 AS A, t1 AS B SET A.pk = 1, B.a = 2;
>> +ERROR HY000: Primary key/partition key update is not allowed since
>> the table is updated both as 'A' and 'B'.
>> +
>> +# Should be (0,0)
>> +SELECT * FROM t1;
>> +pk a
>> +0 0
>> +DROP VIEW v1;
>> +DROP TABLE t1;
>
> I think it would be good to also cover the behavior of an InnoDB table
> without a primary key.

InnoDB always has primary keys. If you don't provide one explicitly, InnoDB 
creates one on an autogenerated column. Is this a request anyway?

>> === modified file 'sql/handler.cc'
>> --- a/sql/handler.cc 2011-02-08 15:54:12 +0000
>> +++ b/sql/handler.cc 2011-02-14 14:51:47 +0000
>> @@ -2879,6 +2879,7 @@ void handler::print_error(int error, myf
>> break;
>> case HA_ERR_KEY_NOT_FOUND:
>> case HA_ERR_NO_ACTIVE_RECORD:
>> + case HA_ERR_RECORD_DELETED:
>> case HA_ERR_END_OF_FILE:
>> textno=ER_KEY_NOT_FOUND;
>> break;
>
> Is this change really needed anymore?

No, but I got the impression from Mattias that this was something that was 
forgotten. I figured there could be other SQL statements that could also get 
into this error code. I don't have a strong opinion either way - remove or keep?

>> === modified file 'sql/share/errmsg-utf8.txt'
>> --- a/sql/share/errmsg-utf8.txt 2011-02-08 17:48:20 +0000
>> +++ b/sql/share/errmsg-utf8.txt 2011-02-14 14:51:47 +0000
>> @@ -6454,3 +6454,6 @@ ER_STMT_CACHE_FULL
>> eng "Multi-row statements required more than
>> 'max_binlog_stmt_cache_size' bytes of storage; increase this mysqld
>> variable and try again"
>> ER_BINLOG_STMT_CACHE_SIZE_GREATER_THAN_MAX
>> eng "Option binlog_stmt_cache_size (%lu) is greater than
>> max_binlog_stmt_cache_size (%lu); setting binlog_stmt_cache_size equal
>> to max_binlog_stmt_cache_size."
>> +
>> +ER_MULTI_UPDATE_KEY_CONFLICT
>> + eng "Primary key/partition key update is not allowed since the table
>> is updated both as '%-.192s' and '%-.192s'."
>
> Maybe replace allowed with supported?

That can be arranged.

> Also, I think it would be good to check with #docs regarding the error
> message text.

I did that before committing the patch :)

-- 
Jørgen Løland | Senior Software Engineer | +47 73842138
Oracle MySQL
Trondheim, Norway
Thread
bzr commit into mysql-trunk branch (jorgen.loland:3641) Bug#11762751Bug#11764529Jorgen Loland14 Feb
  • Re: bzr commit into mysql-trunk branch (jorgen.loland:3641) Bug#11762751Bug#11764529Jon Olav Hauglid15 Feb
    • Re: bzr commit into mysql-trunk branch (jorgen.loland:3641) Bug#11762751Bug#11764529Jorgen Loland15 Feb
      • Re: bzr commit into mysql-trunk branch (jorgen.loland:3641) Bug#11762751Bug#11764529Jon Olav Hauglid15 Feb
        • Re: bzr commit into mysql-trunk branch (jorgen.loland:3641) Bug#11762751Bug#11764529Jorgen Loland17 Feb
          • Re: bzr commit into mysql-trunk branch (jorgen.loland:3641) Bug#11762751Bug#11764529MATTIAS JONSSON17 Feb
            • Re: bzr commit into mysql-trunk branch (jorgen.loland:3641) Bug#11762751Bug#11764529Jorgen Loland17 Feb