Re: [Maria-developers] The funcation of retry_transaction in parallen replication

2013-07-16 Thread nanyi607rao
hi Jeremy,

I can not give a test case because I have changed the way of retrying 
transaction in mysql-5.5.30 and then found this problem. The mysql-5.5.30 SQL 
thread's original way that retry failed events group(or a transaction) is 
droping the failed log-event object, then reading group's log events from BEGIN 
in relay log and applying their objects one by one again.for the log-event 
objects is new, the process of retry can get the same result as last time.
But in parallel replication of dingqi's patch the retry-way is changed. It 
reads in all events of a group and build a list of log-event objects in a time 
, then call log events' do_apply_event function from the event-object list head 
to tail. If there is some error happened, the retry-way is calling log events' 
do_apply_event function from the event-object list head again. so a log event 
object could do do_apply_event() twice. I imitated this process in 
mysql-5.5.30, made a log event object do do_apply_event() twice when it first 
time return nozero. then I find this problem that a 
Rows_log_event::do_apply_event() could call twice but return different 
results(first time is nozero, while second is zero). I also find the reason why 
the second time return zero is m_curr_row==m_rows_end in the Rows_log_event 
object. Does it need to set m_curr_row back to its original value before return 
from Rows_log_event::do_apply_event().

Regards,

Rao


2013-07-16



nanyi607rao



Hi,


Do you have a test case (or sequence of SQL statements you could provide in 
email)? Your email is a bit hard to follow, but this sounds interesting.

Regards,


Jeremy



On Thu, Jul 11, 2013 at 11:51 PM, nanyi607rao  wrote:

hi,
  In order to test  "retry_transaction" in function 
execute_single_transaction(), I change Relay_log_pos to make SQL thread insert 
Duplicate entry, but I find it successed and do not report error!

  so I debug the function execute_single_transaction() and find the reason : at 
first time, the insert Rows_log_event::do_apply_event() return 121, that means 
insert fails. But when retry the insert Rows_log_event::do_apply_event(),it 
return 0, that means insert success! it seems the 
Rows_log_event::do_apply_event() do twice, but return different results. how 
this happened? is it a bug of Rows_log_event::do_apply_event() ?

  By the way, I do this test in mysql-5.5.30, do mariaDB has the some problem?


2013-07-12



nanyi607rao

___
Mailing list: https://launchpad.net/~maria-developers
Post to : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp___
Mailing list: https://launchpad.net/~maria-developers
Post to : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp


[Maria-developers] 答复: Re: The funcation of retry_transaction in parallen replication

2013-07-16 Thread 丁奇
Hi, nanyi607rao
 
  Can you show me the result of "show variables like 'slave_skip_errors';" ?
 
Best Regards,
dingqi
 

--发件人:nanyi607rao
 发送时间:2013年7月16日(星期二) 15:20收件人:Jeremy Cole 
抄 送:maria-developers 
; Kristian Nielsen 
; 丁奇 主 题:Re: Re: 
[Maria-developers] The funcation of retry_transaction in parallen replication
hi Jeremy,
 
I can not give a test case because I have changed the way of retrying 
transaction in mysql-5.5.30 and then found this problem. The mysql-5.5.30 SQL 
thread's original way that retry failed events group(or a transaction) is 
droping the failed log-event object, then reading group's log events from BEGIN 
in relay log and applying their objects one by one again.for the log-event 
objects is new, the process of retry can get the same result as last time.
But in parallel replication of dingqi's patch the retry-way is changed. It 
reads in all events of a group and build a list of log-event objects in a time 
, then call log events' do_apply_event function from the event-object list head 
to tail. If there is some error happened, the retry-way is calling log events' 
do_apply_event function from the event-object list head again. so a log event 
object could do do_apply_event() twice. I imitated this process in 
mysql-5.5.30, made a log event object do do_apply_event() twice when it first 
time return nozero. then I find this problem that a 
Rows_log_event::do_apply_event() could call twice but return different 
results(first time is nozero, while second is zero). I also find the reason why 
the second time return zero is m_curr_row==m_rows_end in the Rows_log_event 
object. Does it need to set m_curr_row back to its original value before return 
from Rows_log_event::do_apply_event().
 
Regards,
 
Rao
 
 
2013-07-16

nanyi607rao

 

Hi,
 
Do you have a test case (or sequence of SQL statements you could provide in 
email)? Your email is a bit hard to follow, but this sounds interesting.
Regards,
 
Jeremy


On Thu, Jul 11, 2013 at 11:51 PM, nanyi607rao  wrote:


hi,
  In order to test  "retry_transaction" in function 
execute_single_transaction(), I change Relay_log_pos to make SQL thread insert 
Duplicate entry, but I find it successed and do not report error!
 
  so I debug the function execute_single_transaction() and find the reason : at 
first time, the insert Rows_log_event::do_apply_event() return 121, that means 
insert fails. But when retry the insert Rows_log_event::do_apply_event(),it 
return 0, that means insert success! it seems the 
Rows_log_event::do_apply_event() do twice, but return different results. how 
this happened? is it a bug of Rows_log_event::do_apply_event() ?
 
  By the way, I do this test in mysql-5.5.30, do mariaDB has the some problem?
 
 
2013-07-12

nanyi607rao

___Mailing list: 
https://launchpad.net/~maria-developersPost to     : 
maria-developers@lists.launchpad.netUnsubscribe : 
https://launchpad.net/~maria-developersMore help   : 
https://help.launchpad.net/ListHelp



___
Mailing list: https://launchpad.net/~maria-developers
Post to : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-developers] More enum values in enum fields

2013-07-16 Thread Stewart Smith
Roberto Spadim  writes:
> ok but why 2^16? it's based in some structure with a variable type that
> can't handler > 2^16 bytes? or just a number like 6 65554
> 65553... ?

uses 16 bits to represent it. It's just the way it is.. hysterical
raisins we used to call it.

> humm i read something about protobuf, but is it human readable?

You can outptu it as human readable fairly easily, it's otherwise a
compact binary format that's generally much quicker to parse than human
readable.
k

-- 
Stewart Smith


pgpoPXaGKyJKH.pgp
Description: PGP signature
___
Mailing list: https://launchpad.net/~maria-developers
Post to : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-developers] More enum values in enum fields

2013-07-16 Thread Stewart Smith
Sergei Golubchik  writes:

> Hi, Roberto!
>
> On Jul 10, Roberto Spadim wrote:
>> 
>> 2)why we "still" with this "old" unireg format?
>
> That was in the agenda for *at least* 10 years. May be 15 already.
>
> Like "it's simple, let's do it next month, shouldn't take more than a
> couple of weeks".
>
> Still, never happened.

Happened in Drizzle, IIRC it was about 6 months of work for the bulk of
it.

-- 
Stewart Smith


pgpWQvUN1Nuft.pgp
Description: PGP signature
___
Mailing list: https://launchpad.net/~maria-developers
Post to : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-developers] More enum values in enum fields

2013-07-16 Thread Stewart Smith
Roberto Spadim  writes:
> hi sergei, well i start thinking about the frm file after i had a crash in
> my server and a aria table was read as a connect table, i removed the .frm
> and put another one in place, and i get my data back
> if i had a human readable file, that could be easier to understand
>
> but what mariadb guys think about standards? stewart talked about protobuf
> (i really like this idea, but don't know how to use), what about json and
> yaml? i think that the main problem is parse time, maybe a jornaling in
> this file to avoid crash? and easy implement new features, example in json
> we can add a new item in object just put ", 'new item':'some value'",
> i don

Schemaless isn't necessarily a feature - protobuf has the benefit of
enforcing a schema (XML would work too... parsing time was a concern
when I wrote the code for Drizzle)

-- 
Stewart Smith


pgplKYrHdG6i2.pgp
Description: PGP signature
___
Mailing list: https://launchpad.net/~maria-developers
Post to : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-developers] More enum values in enum fields

2013-07-16 Thread Stewart Smith
Jean Weisbuch  writes:
> Maybe a transitional setting that would create/update both the "legacy" 
> frm file and a file with the new format when required could be a 
> solution for backward compatibility.
> In that case, it would read the new format definition file if present.

For about the 6 months of development of the protobuf based format in
Drizzle this is what I did, with a healthy number of asserts() comparing
the results of reading both.

For MariaDB, it would mean that when you were doing this you had two
things that could break and when you finally stopped the legacy format,
that would be a very clear break in any on-disk compatibility with MySQL.

-- 
Stewart Smith


pgpaeGCzt7XsK.pgp
Description: PGP signature
___
Mailing list: https://launchpad.net/~maria-developers
Post to : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-developers] LDAP authentication plugin

2013-07-16 Thread IKAC
Hi Sergei,

Sorry for that.

My name is Ilija and I am a undergraduate student of computer science.
I find this project interesting and I'd like to know a bit more about it, so
I could decide whether it is appropriate for me, or not.

Are there any other desirable skills beside C and knowledge of LDAP,
because I have read about comparing to PAM authentication modules
for GSOC proposal?

Do I still have to write a proposal, or some kind of plan for contributing
to the project?

Sorry for all these questions, but this is my first time trying to
contribute
to open source project.

Best regards,
Ilija

On Sun, Jul 14, 2013 at 5:32 PM, Sergei  wrote:

> Hi, Ilija!
>
> On Jul 11, Ilija Lazarevic wrote:
> > Hi Sergei,
> >
> > The reason I'm writing you is because I'm interested
> > in details about this gsoc2013 proposal, and I saw you were
> > supposed to be the mentor.
> >
> > Is it open for contributing apart from gsoc?
>
> Yes, it is.
>
> But please, write to maria-developers@lists.launchpad.net next time, not
> to me personally.
>
> Regards,
> Sergei
>
___
Mailing list: https://launchpad.net/~maria-developers
Post to : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-developers] help creating error messages

2013-07-16 Thread Sergei Golubchik
Hi, Roberto!

On Jul 10, Roberto Spadim wrote:
> other doubt...
> there's no plugin to read this file right? could i create a
> error_messages plugin? it will read the err file and return something
> like:
> ||Language|error code|error text||
> |en_US|1234|hello|

What do you want to achieve? To have a list of all error messages in the
information_schema table? What for?

> where could i read all error codes? i was reading unireg there's some

include/mysqld_error.h

> macros, but they are locale specific, there's some 'all locales'
> variable?  or some function that could read this errors codes /
> messages?

ER() returns the error code in the current language. ER_DEFAULT() - in
the default one.

Regards,
Sergei


___
Mailing list: https://launchpad.net/~maria-developers
Post to : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-developers] help creating error messages

2013-07-16 Thread Roberto Spadim
nice
well today i'm using perror to understand errors, but sometimes i don't
have perror in my computer or the sql error isn't clear
is error at information schema usefull? or maybe we should improve error
messages?
i don't remember all error i got now that isn't clear and i used perror to
understand, but with time i can comment about each error that isn't clear


2013/7/16 Sergei Golubchik 

> Hi, Roberto!
>
> On Jul 10, Roberto Spadim wrote:
> > other doubt...
> > there's no plugin to read this file right? could i create a
> > error_messages plugin? it will read the err file and return something
> > like:
> > ||Language|error code|error text||
> > |en_US|1234|hello|
>
> What do you want to achieve? To have a list of all error messages in the
> information_schema table? What for?
>
> > where could i read all error codes? i was reading unireg there's some
>
> include/mysqld_error.h
>
> > macros, but they are locale specific, there's some 'all locales'
> > variable?  or some function that could read this errors codes /
> > messages?
>
> ER() returns the error code in the current language. ER_DEFAULT() - in
> the default one.
>
> Regards,
> Sergei
>
>


-- 
Roberto Spadim
SPAEmpresarial
___
Mailing list: https://launchpad.net/~maria-developers
Post to : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp