Re: [Maria-developers] More enum values in enum fields
Hi, Roberto! On Jul 10, Roberto Spadim wrote: > hum... i saw now the view .frm file it's nice... > i don't read the internal source code, but is it easy to extend? don't > have a limit like today .frm file? Shouldn't have limits, it's just a plain-text CREATE TABLE statement. 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] More enum values in enum fields
Hi, 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. Another possibility could be that we could choose the default format and only newly created tables would use that format but it wouldnt modify the existing ones (or maybe via an ALTER). It also could be of use to have a tool that could offline convert the files between the two format in case MariaDB would have to be downgraded or replaced by MySQL or another fork that does not support the new definition file format. Regards. Le 10/07/2013 08:37, Sergei Golubchik a écrit : 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. i know that someone must start the new format and it will not be compatible with mysql... but there's any raw idea or a issue in mdev or lauchpad about changing .frm format or creating a new one? Yes, create a view and look at its frm file. The code for writing and reading new frm files is already there. 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
Hi, Roberto! On Jul 09, Roberto Spadim wrote: > hi guys, how could i create a new error / warning message in mariadb? > 1) how to add the message text to error list (there's a list, right?) in sql/share/errmsg-utf8.txt at the end, where mariadb-specific error messages are > 2) how to return (send) a error to client my_error or my_printf_error > 3) how to add a message to 'warning list' and after get it with SHOW > WARNINGS push_warning or push_warning_printf 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
[Maria-developers] ALTER ONLINE TABLE syntax
Hi, You've added this ALTER ONLINE TABLE syntax, where ONLINE de facto means "without copying the data". Now, after 5.6 merge we also have ALGORITHM=COPY|INPLACE and LOCK=NONE|SHARED|EXCLUSIVE. I've mapped ONLINE to ALGORITHM=INPLACE, because that's what it means. But it's confusing, one can have an "inplace" operation under an exclusive lock, if the engine wants it that way. And it won't be "online" by any stretch of imagination. One can also technically have a "copy" operation with a very permissive write-allow-write lock, and it'll be as online as one can get it. I mean, logically ONLINE should mean LOCK=NONE, not ALGORITHM=INPLACE. But that would change the existing behavior and the test results too. For example, *any* ALTER on the temporary table would always be "online", because, well, it wouldn't take any lock on that table. Alternatively, we can keep ONLINE as ALGORITHM=INPLACE, and deprecate it, issue a warning, suggesting to use the new 5.6 syntax. Opinions? 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] ALTER ONLINE TABLE syntax
Hi, I really do not see why you would want to define both algorithm and lock mode. In my transactional view ALGORITHM=COPY would mean EXCLUSIVE lock and INPLACE would mean SHARED lock. Is there some other lock that protects from concurrent online alter tables ? Lock NONE would mean I do not care what happens. R: Jan Hi, You've added this ALTER ONLINE TABLE syntax, where ONLINE de facto means "without copying the data". Now, after 5.6 merge we also have ALGORITHM=COPY|INPLACE and LOCK=NONE|SHARED|EXCLUSIVE. I've mapped ONLINE to ALGORITHM=INPLACE, because that's what it means. But it's confusing, one can have an "inplace" operation under an exclusive lock, if the engine wants it that way. And it won't be "online" by any stretch of imagination. One can also technically have a "copy" operation with a very permissive write-allow-write lock, and it'll be as online as one can get it. I mean, logically ONLINE should mean LOCK=NONE, not ALGORITHM=INPLACE. But that would change the existing behavior and the test results too. For example, *any* ALTER on the temporary table would always be "online", because, well, it wouldn't take any lock on that table. Alternatively, we can keep ONLINE as ALGORITHM=INPLACE, and deprecate it, issue a warning, suggesting to use the new 5.6 syntax. ___ 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] ALTER ONLINE TABLE syntax
Hi, Jan! On Jul 10, Jan Lindström wrote: > > I really do not see why you would want to define both algorithm and > lock mode. In my transactional view ALGORITHM=COPY would mean > EXCLUSIVE lock and INPLACE would mean SHARED lock. Is there some other > lock that protects from concurrent online alter tables ? Lock NONE > would mean I do not care what happens. ALGORITHM=COPY does not mean an EXCLUSIVE lock even now. Never did. It always used TL_READ_NO_INSERT lock, which is compatible with TL_READ lock, so it's shared, in a sense. One can read the table that is being altered (yes, there was an exclusive lock for a short while too). COPY/NONE isn't very difficult to implement either. Say, you start a replication slave, copy the table there, ALTER it on the slave, wait for a slave to catch up, and swap master and a slave under an exclusive lock. While the table is being altered (on the slave) there is no lock (on the master) whatsoever. Other combinations are possible too, I can easily describe an implementation that has, say, INPLACE/EXCLUSIVE (with the, for example, archive engine). 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] More enum values in enum fields
2013/7/10 Jean Weisbuch > Hi, > > 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. > Another possibility could be that we could choose the default format and > only newly created tables would use that format but it wouldnt modify the > existing ones (or maybe via an ALTER). > i like the ALTER idea, something like ALTER TABLE FRM_FORMAT='OLD/JSON/YAML/TEXT/xyz/protobuff/ etc' > It also could be of use to have a tool that could offline convert the > files between the two format in case MariaDB would have to be downgraded or > replaced by MySQL or another fork that does not support the new definition > file format. > it's nice too, i put a MDEV when my frm file crashed, maybe we could put this idea there: https://mariadb.atlassian.net/browse/MDEV-4637 - what format we should use? what format is easy to develop, fast, compact, human compatible, etc...? json,yaml,protobuf,text file like view format? any idea? i think that at least file should have a hash (md5 for example) to easly find crashed files, should be easly readable by humans (json/yaml/view like) and fast to read/write (protobuf for example or some binary format) i was thinking about something like (json example): "{some json definition}\n BINARY FORMAT\n MD5SUM" the MD5SUM is a MD5 value from "{" to end of BINARY FORMAT (before "\n") if we remove the BINARY FORMAT, MD5 will change, if we don't have the BINARY FORMAT mariadb read the json, and save the binary format if BINARY FORMAT exists we should use it, if some user changed the json it should remove binary format and md5 or mysql should report a error "No MD5SUM on frm file %s", "Wrong MD5SUM on frm file %s", when file don't have a BINARY_FORMAT we could log it as a warning "No binary format at frm file %s, creating..." I think it's a easy format to change (add coments) and repair file via "vi","nano","notepad" etc, i don't know how easy it's to implement at source code (json + protobuf/binary format + logs) what you think guys? ___ 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
thanks sergei!! i will put this in my 'source code manual' 2013/7/10 Sergei Golubchik > Hi, Roberto! > > On Jul 09, Roberto Spadim wrote: > > hi guys, how could i create a new error / warning message in mariadb? > > 1) how to add the message text to error list (there's a list, right?) > > in sql/share/errmsg-utf8.txt > at the end, where mariadb-specific error messages are > > > 2) how to return (send) a error to client > > my_error or my_printf_error > > > 3) how to add a message to 'warning list' and after get it with SHOW > > WARNINGS > > push_warning or push_warning_printf > > 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
Re: [Maria-developers] help creating error messages
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| where could i read all error codes? i was reading unireg there's some macros, but they are locale specific, there's some 'all locales' variable? or some function that could read this errors codes / messages? thanks again 2013/7/10 Roberto Spadim > thanks sergei!! > i will put this in my 'source code manual' > > > 2013/7/10 Sergei Golubchik > >> Hi, Roberto! >> >> On Jul 09, Roberto Spadim wrote: >> > hi guys, how could i create a new error / warning message in mariadb? >> > 1) how to add the message text to error list (there's a list, right?) >> >> in sql/share/errmsg-utf8.txt >> at the end, where mariadb-specific error messages are >> >> > 2) how to return (send) a error to client >> >> my_error or my_printf_error >> >> > 3) how to add a message to 'warning list' and after get it with SHOW >> > WARNINGS >> >> push_warning or push_warning_printf >> >> Regards, >> Sergei >> > > > > -- > Roberto Spadim > SPAEmpresarial > -- 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
[Maria-developers] a bug of ding-qing parallel replication
hi guys, I find a bug of ding-qing parallel replication. let's consider a table like this: create table t1( a int(11) NOT NULL DEFAULT '0', b varchar(10), PRIMARY KEY (a) )ENGINE=InnoDB if we do transactions on master(binlog_format=ROW) like this: trans 1: begin; insert into t1 values(1, "tt"); update t1 set a=2 where a=1; commit; trans 2; begin; update t1 set b="kk" where a=2; commit; then this two transactions binlog transmit to the slave, because trans 1 and trnas 2 has different primary keys, it would disaptch in different threads like this: thread 1 do trans 1 thread 2 do trans 2 thread 2 may update t1 before thread 1, then it will fail. maybe thread 2 can retry sever times ,but it don't solve this problem compeletly.. 2013-07-11 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
Re: [Maria-developers] a bug of ding-qing parallel replication
"nanyi607rao" writes: > I find a bug of ding-qing parallel replication. > > let's consider a table like this: > > create table t1( > a int(11) NOT NULL DEFAULT '0', > b varchar(10), > PRIMARY KEY (a) > )ENGINE=InnoDB > > if we do transactions on master(binlog_format=ROW) like this: > trans 1: > begin; > insert into t1 values(1, "tt"); > update t1 set a=2 where a=1; > commit; > trans 2; > begin; > update t1 set b="kk" where a=2; > commit; > > then this two transactions binlog transmit to the slave, because trans 1 and > trnas 2 has different primary keys, it would disaptch in different threads > like this: >thread 1 do trans 1 >thread 2 do trans 2 I wonder if this problem is because the code does not detect that trans 1 accesses both primary key values a=1 and a=2? If so, it should be possible to fix. For an UPDATE statement, the row events have both the before image (with a=1) and the after image (with a=2). Maybe there is a bug in the current code that it does not look in the after image? (I am still very interested in adding this feature to MariaDB. Unfortunately I have been too busy with two other big tasks, hopefully once they are done I can get back to this one). - Kristian. ___ 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