Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: can't save any article
Is that this?
[MariaDB 11.8] UNIX_TIMESTAMP() now returns NULL instead of 0 (zero):
TXP Builders – finely-crafted code, design and txp
Offline
Re: can't save any article
jakob wrote #342205:
Is this?
You beat me to it. I was gonna post the same link. Might be related. It’s the only timestampish issues I can find up there at the moment.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Online
Re: can't save any article
If it is that, and we get null back instead of an integer, can we detect it and swap the return value for a 0 so everything carries on working? I don’t think PHP allows us to cast null to int any more, but it might.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Online
Re: can't save any article
jakob wrote #342205:
Is that this?
Oh, thanks, have not seen it. So yes, this looks like a critical mariadb bug. I was actually thinking of that, but they are certainly related.
Bloke wrote #342207:
If it is that, and we get null back instead of an integer, can we detect it and swap the return value for a 0 so everything carries on working? I don’t think PHP allows us to cast null to int any more, but it might.
Nope, we’d need to handle it at the db level, and it looks cumbersome. I would rather avoid this gymnastics.
Offline
Re: can't save any article
etc wrote #342208:
… this looks like a critical mariadb bug.
just asking/wondering…. why don’t the folks responsible for MariaDb fix the bug?
…. texted postive
Offline
Re: can't save any article
Gentle, respectful reminder: we don’t officially support MariaDB with Textpattern 4.x. There is no explicit mention of ABI compatibility, as far as I know. There is a compatibility and differences landing page on their docs.
I’m running Textpattern 4.9.0 on MariaDB 10.11, which is a well-established LTS branch with a long-ish shelf life ahead. I haven’t found any issues to date. MariaDB 11.8 is around 7 months old at the present time.
@Adams: Perhaps it’s worth switching to an earlier LTS branch if MariaDB is on the cards?
Offline
Re: can't save any article
gaekwad wrote #342211:
we don’t officially support MariaDB with Textpattern 4.x.
Aye, noted but if it happened to be an easy fix, it’d be a nice win for 4.9.1. Sadly looks as if it’s out of reach unless they can resolve it.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Online
Re: can't save any article
Well, there might be an easy fix, it just looks dirty. We’d have to detect once the value of
SELECT FROM_UNIXTIME(0)
and use FROM_UNIXTIME(0) if it is not null, and FROM_UNIXTIME(1) otherwise. This would introduce 1s dates shift on faulty MariaDB servers, but this is comparable to servers time accuracy. But someone needs to test whether FROM_UNIXTIME(1) works first.
Offline
Re: can't save any article
etc wrote #342213:
This would introduce 1s dates shift on faulty MariaDB servers
Unlikely anyone would notice. The only fallout would be people who use content expiry at 23:59:59, which might push the expiry into “next day”.
Edit: and it looks as if the humble second might be on its way out anyway once leap seconds are abolished in 2035.
Adams: are you able to confirm if FROM_UNIXTIME(1)@ works please?
Last edited by Bloke (2026-01-13 18:37:05)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Online