Download & Extend

SchemaCache generates empty cid

Project:Drupal core
Version:7.x-dev
Component:base system
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)
Issue tags:needs backport to D7

Issue Summary

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'

AttachmentSizeStatusTest resultOperations
empty-cid.png25.73 KBIgnored: Check issue status.NoneNone
empty_cid.patch529 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 32,867 pass(es).View details

Comments

#1

Well spotted! tests?

#2

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 ?

AttachmentSizeStatusTest resultOperations
1289364-before.patch1009 bytesIdleFAILED: [[SimpleTest]]: [MySQL] 32,891 pass(es), 1 fail(s), and 0 exception(es).View details
1289364-after.patch1.5 KBIdlePASSED: [[SimpleTest]]: [MySQL] 32,879 pass(es).View details

#3

Component:cache system» base system
Status:needs review» reviewed & tested by the community

Looks good, nice find!

#4

Status:reviewed & tested by the community» fixed

Committed to 8.x. Thanks!

#5

Version:8.x-dev» 7.x-dev
Status:fixed» needs review

Here's the 7.x version.

AttachmentSizeStatusTest resultOperations
1289364-after.patch1.51 KBIdlePASSED: [[SimpleTest]]: [MySQL] 36,058 pass(es).View details

#6

Status:needs review» needs work

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

#7

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)

#8

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

#9

Status:needs review» reviewed & tested by the community

Looks fine for 7.x too.

#10

Committed and pushed to 7.x. Thanks!

#11

Status:reviewed & tested by the community» fixed

#12

Status:fixed» closed (fixed)

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

nobody click here