The __construct function in SchemaCache generates an empty $cid, at least on my setup:

Mamp pro 2.0 - php 5.3.6 - see screenshot underneath. I'm seeing this in both D8 and D.

Patch attached generates the cid as 'schema:runtime:1'

Files: 
CommentFileSizeAuthor
#5 1289364-after.patch1.51 KBswentel
PASSED: [[SimpleTest]]: [MySQL] 36,058 pass(es).
[ View ]
#2 1289364-before.patch1009 bytesswentel
FAILED: [[SimpleTest]]: [MySQL] 32,891 pass(es), 1 fail(s), and 0 exception(es).
[ View ]
#2 1289364-after.patch1.5 KBswentel
PASSED: [[SimpleTest]]: [MySQL] 32,879 pass(es).
[ View ]
empty_cid.patch529 bytesswentel
PASSED: [[SimpleTest]]: [MySQL] 32,867 pass(es).
[ View ]
empty-cid.png25.73 KBswentel

Comments

Well spotted! tests?

StatusFileSize
new1.5 KB
PASSED: [[SimpleTest]]: [MySQL] 32,879 pass(es).
[ View ]
new1009 bytes
FAILED: [[SimpleTest]]: [MySQL] 32,891 pass(es), 1 fail(s), and 0 exception(es).
[ View ]

Added a very simple test - the before patch will fail, the after should pass.
Should cache_set also do nothing if the $cid is empty ?

Component:cache system» base system
Status:Needs review» Reviewed & tested by the community

Looks good, nice find!

Status:Reviewed & tested by the community» Fixed

Committed to 8.x. Thanks!

Version:8.x-dev» 7.x-dev
Status:Fixed» Needs review
StatusFileSize
new1.51 KB
PASSED: [[SimpleTest]]: [MySQL] 36,058 pass(es).
[ View ]

Here's the 7.x version.

Status:Needs review» Needs work

The last submitted patch, 1289364-after.patch, failed testing.

Status:Needs work» Needs review

Hmm, ok, I don't really see why this might trigger an exception there - just trying another review, maybe there's been a slight glitch - will ping one of the testbot maintainers afterwards (or I should try it out locally first maybe)

#5: 1289364-after.patch queued for re-testing.

Status:Needs review» Reviewed & tested by the community

Looks fine for 7.x too.

Issue tags:+needs backport to D7

Committed and pushed to 7.x. Thanks!

Status:Reviewed & tested by the community» Fixed

Automatically closed -- issue fixed for 2 weeks with no activity.