difference on: default - appropriate action?

TallDavid - May 10, 2009 - 18:28
Project:Schema
Version:6.x-1.6
Component:User interface
Category:support request
Priority:normal
Assigned:mikeryan
Status:postponed
Issue tags:default, mismatch, schema module
Description

Schema modules reports Mismatch issues with default values similar to the one below:

  • comments

    • column thread - difference on: default
      declared: array('description' => t('TODO: please describe this field!'), 'type' => 'varchar', 'length' => 255, 'not null' => TRUE)

      actual: array('description' => t('TODO: please describe this field!'), 'type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'default' => '')
  • What is the appropriate action that should be taken to correct this type of mismatch?

    #1

    mikeryan - May 10, 2009 - 18:51

    Is this a dupe of #256826: Comparison mismatch when default is NULL? Does the patch there eliminate the message? I couldn't reproduce a problem there...

    What Drupal core version are you on? What MySQL version?

    #2

    TallDavid - May 10, 2009 - 19:34

    Not sure.
    Was that patch to 1.3 rolled into the 1.4-rc1 version?
    Should I ignore the Schema Mismatch report or is there something that I need to do to update the database tables?

    #3

    mikeryan - May 10, 2009 - 20:08

    No, I didn't roll it in because I couldn't reproduce the problem it purports to solve. You're seeing exactly the symptom I would expect, so if you could try applying the patch and see if it eliminates the mismatch message, that would demonstrate that the patch is good and I will roll it in.

    There doesn't appear to be an actual issue with your tables - the issue is with an apparently-spurious message.

    #4

    TallDavid - May 10, 2009 - 23:34

    Sorry, I'm not setup to apply patches. I'll gladly test a -dev version with the patch already applied.

    It looks like I missed two of your previous questions. Drupal version 6.11. MySQL version 5.1.30.
    Since you confirm that there doesn't appear to be an actual issue with the tables, I'll ignore the error message until a pre-rolled test version is available.

    #5

    mikeryan - June 6, 2009 - 16:31
    Status:active» postponed (maintainer needs more info)

    Can you execute the query

    SELECT COLUMN_NAME,COLUMN_DEFAULT FROM COLUMNS WHERE TABLE_SCHEMA = 'your db name here'
    AND TABLE_NAME = comments

    and see what default is reported for the thread column? I get NULL with MySQL 5.0.41...

    #6

    mikeryan - July 11, 2009 - 17:21
    Status:postponed (maintainer needs more info)» closed

    #7

    TallDavid - September 19, 2009 - 18:30
    Version:6.x-1.4-rc1» 6.x-1.6
    Status:closed» active

    As requested:

    SELECT COLUMN_NAME, COLUMN_DEFAULT
    FROM COLUMNS WHERE TABLE_SCHEMA = 'talldave_drpl24'
    AND TABLE_NAME = comments

    MySQL said: Documentation
    #1146 - Table 'talldave_drpl24.COLUMNS' doesn't exist

    [Note to self: T-H.com]

    #8

    mikeryan - September 23, 2009 - 20:47
    Status:active» postponed (maintainer needs more info)

    My bad, here's the query to try:

    SELECT COLUMN_NAME,COLUMN_DEFAULT FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'talldave_drpl24'
    AND TABLE_NAME = 'comments'

    #9

    TallDavid - September 25, 2009 - 23:59

    Here's the output:

    COLUMN_NAME COLUMN_DEFAULT
    cid NULL
    pid 0
    nid 0
    uid 0
    subject
    comment NULL
    hostname
    timestamp 0
    status 0
    format 0
    thread
    name NULL
    mail NULL
    homepage NULL

    #10

    TallDavid - September 27, 2009 - 15:59
    Status:postponed (maintainer needs more info)» active

    #11

    mikeryan - September 27, 2009 - 16:21
    Assigned to:Anonymous» mikeryan
    Status:active» needs review

    OK, you are missing NULL on thread, which implies to me that the patch in the referenced issue may fix it. I've committed that - please give the current CVS a try.

    Thanks.

    #12

    TallDavid - October 21, 2009 - 00:52
    Status:needs review» active

    Problem still exists with 6.x-1.x-dev dated 2009-Sep-27.

    #13

    mikeryan - February 1, 2010 - 17:50
    Status:active» postponed

    I've never been able to reproduce this issue - it would best be fixed by someone who can reproduce it.

     
     

    Drupal is a registered trademark of Dries Buytaert.