[Maria-discuss] Fwd: [debian-mysql] Bug#688505: MariaDB packaging.
A good wishlist. I think more should vote for this, quite clearly! cheers, -colin Begin forwarded message:
Resent-From: Robert de Bath <robert$@debath.co.uk> From: Robert de Bath <robert$@debath.co.uk> Subject: [debian-mysql] Bug#688505: MariaDB packaging. Date: 23 September 2012 16:25:39 GMT+08:00 Resent-To: debian-bugs-dist@lists.debian.org To: submit@bugs.debian.org Resent-Cc: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org> Reply-To: Robert de Bath <robert$@debath.co.uk>, 688505@bugs.debian.org
Package: mysql-server Version: 5.5.24+dfsg-8 Severity: wishlist
My very technically savvy webhost has recently switched from MySQL to MariaDB and claim it's for both technical and political reasons.
Both of these reasons (better performance and better licensing) appear to be good reasons for the software to be packaged as a Debian package and I expect it's getting to the point that someone will do it themselves.
BUT the software is technically still not a forked variant of MySQL but a patched version where the maintainers continually resync to the Oracle releases. For this reason I would like to see it treated as just a simple MySQL version within Debian. This way the users (ie: me) can simply switch by prodding apt in the right way.
For this to work seamlessly (unlike, for example, the recent multimedia troubles) the MariaDB package should be packaged identically to MySQL, which IMO is best done by the same Debian maintainers.
So my request is that you package the MariaDB as a secondary version of MySQL in such a way that the two packages can be seamlessly switched within the Debian system.
-- Rob. (Robert de Bath <robert$ @ debath.co.uk>) <http://www.debath.co.uk/>
_______________________________________________ pkg-mysql-maint mailing list pkg-mysql-maint@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-mysql-maint
-- Colin Charles, http://bytebot.net/blog/ | twitter: @bytebot | skype: colincharles MariaDB: Community developed. Feature enhanced. Backward compatible. Download it at: http://www.mariadb.org/ Open MariaDB/MySQL documentation at the Knowledgebase: http://kb.askmonty.org/
I'm not sure if I use a wrong syntax or I found a bug. But I can't read a column's default value from a trigger. The trigger just checks if the INSERT is trying to set a column to its default value: DELIMITER || CREATE TABLE `blog` ( `created_by` CHAR(60) NOT NULL DEFAULT '' ); CREATE TRIGGER `blog_default_created_by` BEFORE INSERT ON `blog` FOR EACH ROW BEGIN IF NEW.`created_by` = DEFAULT(NEW.`created_by`) THEN SET NEW.`created_by` = USER(); END IF; END; || DELIMITER ; But when I try to INSERT a row I get an error: MariaDB [test]> INSERT INTO `blog` SET `created_by` = ''; ERROR 1364 (HY000): Field 'created_by' doesn't have a default value This problem disappears if I replace DEFAULT(NEW.`created_by`) with '', so I'm not in troubles - but in theory a default value may change, so using DEFAULT() is a better practice. The syntax I'm using could be wrong, but I've tried all the alternatives which seemed to me possible, and they didn't work: DEFAULT, DEFAULT(`created_by`), DEFAULT('created_by'). However I may still miss something, so I wanted to ask to the list before reporting this in JIRA. Federico Razzoli
Hi!
"Federico" == Federico Razzoli <federico_raz@yahoo.it> writes:
Federico> I'm not sure if I use a wrong syntax or I found a bug. But I can't read a column's default value from a trigger. Federico> The trigger just checks if the INSERT is trying to set a column to its default value: Federico> DELIMITER || Federico> CREATE TABLE `blog` Federico> ( Federico> `created_by` CHAR(60) NOT NULL DEFAULT '' Federico> ); Federico> CREATE TRIGGER `blog_default_created_by` Federico> BEFORE INSERT Federico> ON `blog` Federico> FOR EACH ROW Federico> BEGIN Federico> IF NEW.`created_by` = DEFAULT(NEW.`created_by`) THEN Federico> SET NEW.`created_by` = USER(); Federico> END IF; Federico> END; Federico> || Federico> DELIMITER ; Federico> But when I try to INSERT a row I get an error: Federico> MariaDB [test]> INSERT INTO `blog` SET `created_by` = ''; Federico> ERROR 1364 (HY000): Field 'created_by' doesn't have a default value Federico> This problem disappears if I replace DEFAULT(NEW.`created_by`) with '', so I'm not in troubles - but in theory a default value may change, so using DEFAULT() is a better practice. Federico> The syntax I'm using could be wrong, but I've tried all the alternatives which seemed to me possible, and they didn't work: DEFAULT, DEFAULT(`created_by`), DEFAULT('created_by'). This is a bug in how MariaDB / MySQL detects if a field has a default value. It's probably because of this is a trigger on 'new', which is not something that is apparently not handled properly. Do you want to try to fix it yourself? (Shouldn't take many minutes ;) Regards, Monty
--- Ven 18/1/13, Michael Widenius <monty@askmonty.org> ha scritto:
Da: Michael Widenius <monty@askmonty.org> Oggetto: re: [Maria-discuss] Reading a field's default value from a trigger A: "Federico Razzoli" <federico_raz@yahoo.it> Cc: "Maria Discuss" <maria-discuss@lists.launchpad.net> Data: Venerdì 18 gennaio 2013, 19:51
This is a bug in how MariaDB / MySQL detects if a field has a default value. It's probably because of this is a trigger on 'new', which is not something that is apparently not handled properly.
Do you want to try to fix it yourself? (Shouldn't take many minutes ;)
Regards, Monty
Hi Monty, sorry I'm not experienced in C and I don't know MySQL code.
From what you written, my guess is that the condition in Field::set_explicit_default is wrong... but I'm not sure.
However, I think I can write a test in triggers.test if you want Federico Razzoli
participants (3)
-
Colin Charles
-
Federico Razzoli
-
Michael Widenius