Note the warnings at the end. Also, I was never actually prompted to enter anything at the y/n prompt at the end. I typed drush update, and the next time I could input anything was when my next shell prompt appeared.

$ drush update
Refreshing update status information ...
Done.
Update information last refreshed: Thu, 07/30/2009 - 18:07

Update status information on all installed and enabled Drupal modules:
 Name                      Installed version  Proposed version  Status
 Administration menu       6.x-1.5            6.x-1.5           Up to date
 Advanced help             6.x-1.2            6.x-1.2           Up to date
 Autosave                  6.x-1.1            6.x-1.1           Up to date
 Drupal                    6.13               6.13              Up to date
 Content Construction Kit  6.x-2.4            6.x-2.4           Up to date
 (CCK)
 Date                      6.x-2.3            6.x-2.3           Up to date
 DHTML Menu                6.x-3.5            6.x-3.5           Up to date
 Global Redirect           6.x-1.2            6.x-1.2           Up to date
 Google Analytics          6.x-2.2            6.x-2.2           Up to date
 Link                      6.x-2.6            6.x-2.6           Up to date
 Poormanscron              6.x-1.0            6.x-1.0           Up to date
 Token                     6.x-1.12           6.x-1.12          Up to date
 Viewfield                 6.x-1.x-dev        6.x-1.x-dev       Up to date
 Views                     6.x-2.6            6.x-2.6           Up to date
 Wysiwyg                   6.x-2.0            6.x-2.0           Up to date
 Framework                 6.x-2.6            6.x-2.6           Up to date

No code updates available.                                           [ok]
You have pending database updates. Please run `drush updatedb` or    [warning]
visit update.php in your browser.
ALTER TABLE {date_format} RENAME TO {date_formats}                   [success]
ALTER TABLE {date_formats} DROP KEY format                           [success]
ALTER TABLE {date_formats} ADD UNIQUE KEY formats (format, type)     [success]
ALTER TABLE {date_formats} CHANGE format format VARCHAR( 100 )       [success]
CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
ALTER TABLE {date_format_locale} CHANGE format format VARCHAR( 100 ) [success]
CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
Finished performing updates.                                         [ok]
The following updates are pending:

 date_api module
 6004 - The "date_format" table is missing on boxes having MySQL 5.0.67
 installed.  There seems to be a bug in MySQL that prevents the creation of
 tables with  a name "date_format" and indexes with the name "format".    We
 rename the table and index as a workaround.
 6005 - Make sure MYSQL does not stupidly do case-insensitive   searches and
 indexes on our formats.  @see
 http:pure.rednoize.com20061126mysql-collation-matters-when-using-unique-indexe
 s  @see http:jjinux.blogspot.com200903mysql-case-sensitivity-hell.html  @see
 http:dev.mysql.comdocrefman5.0encase-sensitivity.html

Do you wish to run all pending updates? (y/n): y

Comments

aren cambre’s picture

Also, following up with another drush update confirms that the updates did happen despite the warnings/errors:

$ drush update
Refreshing update status information ...
Done.
Update information last refreshed: Thu, 07/30/2009 - 18:10

Update status information on all installed and enabled Drupal modules:
 Name                      Installed version  Proposed version  Status
 Administration menu       6.x-1.5            6.x-1.5           Up to date
 Advanced help             6.x-1.2            6.x-1.2           Up to date
 Autosave                  6.x-1.1            6.x-1.1           Up to date
 Drupal                    6.13               6.13              Up to date
 Content Construction Kit  6.x-2.4            6.x-2.4           Up to date
 (CCK)
 Date                      6.x-2.3            6.x-2.3           Up to date
 DHTML Menu                6.x-3.5            6.x-3.5           Up to date
 Global Redirect           6.x-1.2            6.x-1.2           Up to date
 Google Analytics          6.x-2.2            6.x-2.2           Up to date
 Link                      6.x-2.6            6.x-2.6           Up to date
 Poormanscron              6.x-1.0            6.x-1.0           Up to date
 Token                     6.x-1.12           6.x-1.12          Up to date
 Viewfield                 6.x-1.x-dev        6.x-1.x-dev       Up to date
 Views                     6.x-2.6            6.x-2.6           Up to date
 Wysiwyg                   6.x-2.0            6.x-2.0           Up to date
 Framework                 6.x-2.6            6.x-2.6           Up to date

No code updates available.                                           [ok]
No database updates required                                         [success]
Finished performing updates.                                         [ok]
aren cambre’s picture

Title: UI shows warnings in wrong place and autoenters Y at y/n prompt » Wrong and misplaced warnings, autoenters y/n prompt

This time it advised a database update was needed when either it wasn't needed or it was already done. It again auto-entered a y in the y/n prompt; I did not type the y.

$ drush update
Refreshing update status information ...
Done.
Update information last refreshed: Tue, 08/04/2009 - 02:27

Update status information on all installed and enabled Drupal modules:
 Name                            Installed      Proposed       Status
                                 version        version
 Addresses                       6.x-1.05       6.x-1.05       Up to date
 Administration menu             6.x-1.5        6.x-1.5        Up to date
 Advanced help                   6.x-1.2        6.x-1.2        Up to date
 Automatic Nodetitles            6.x-1.2        6.x-1.2        Up to date
 Autosave                        6.x-1.1        6.x-1.1        Up to date
 Drupal                          6.13           6.13           Up to date
 Content Construction Kit (CCK)  6.x-2.4        6.x-2.5        Update available
 Date                            6.x-2.3        6.x-2.3        Up to date
 DHTML Menu                      6.x-3.5        6.x-3.5        Up to date
 Global Redirect                 6.x-1.2        6.x-1.2        Up to date
 Google Analytics                6.x-2.2        6.x-2.2        Up to date
 Link                            6.x-2.6        6.x-2.6        Up to date
 Node import                     6.x-1.x-dev    6.x-1.0-rc4    Up to date
 Pathauto                        6.x-1.1        6.x-1.1        Up to date
 Phone (CCK)                     6.x-2.8        6.x-2.8        Up to date
 Poormanscron                    6.x-1.0        6.x-1.0        Up to date
 Token                           6.x-1.12       6.x-1.12       Up to date
 Update status advanced          6.x-1.x-dev    6.x-1.0        Up to date
 settings
 Views                           6.x-2.6        6.x-2.6        Up to date
 Wysiwyg                         6.x-2.0        6.x-2.0        Up to date
 Views Bulk Operations (VBO)     6.x-1.7        6.x-1.7        Up to date
 Admin block                     6.x-1.1        6.x-1.1        Up to date
 Big Autocomplete TAXonomy       6.x-1.5        6.x-1.5        Up to date
 Computed Field                  6.x-1.0-beta2  6.x-1.0-beta3  Update available
 Content Templates               6.x-1.1        6.x-1.1        Up to date
 (Contemplate)
 Diff                            6.x-2.0        6.x-2.0        Up to date
 Email Field                     6.x-1.2        6.x-1.2        Up to date
 Format Number API               6.x-1.4        6.x-1.4        Up to date
 IMCE                            6.x-1.2        6.x-1.2        Up to date
 IMCE Wysiwyg bridge             6.x-1.0        6.x-1.0        Up to date
 Term lower name                 6.x-1.1        6.x-1.1        Up to date
 modr8                           6.x-1.1        6.x-1.1        Up to date
 Mollom                          6.x-1.9        6.x-1.9        Up to date
 Viewfield                       6.x-1.x-dev    6.x-1.x-dev    Up to date
 Views Calc                      6.x-1.3        6.x-1.3        Up to date
 Views Custom Field              6.x-1.0        6.x-1.0        Up to date
 Framework                       6.x-2.6        6.x-2.6        Up to date

Code updates will be made to the following projects:
Content Construction Kit (CCK) [cck-6.x-2.5], Computed Field [computed_field-6.x-1.0-beta3]

Note: Updated modules can potentially break your site. It's not recommended to update production sites without prior testing.
Note: A backup of your package will be stored to backups directory if it is not managed by a supported version control system.
Note: If you have made any modifications to any file that belongs to one of these projects, you will have to migrate those modifications after updating.
Do you really want to continue? (y/n): y
Project cck was updated successfully. Installed version is now 6.x-2.5.
Project computed_field was updated successfully. Installed version is now 6.x-1.0-beta3.
Backups were saved into the directory                                [ok]
/[my root directory]/drupal6/backup/modules/20090803192737.
Cache cleared.
warning: mkdir(): File exists in                                     [warning]
/[my root directory]/drush/includes/drush.inc on line 251.
You have pending database updates. Please run `drush updatedb` or    [warning]
visit update.php in your browser.
ALTER TABLE {content_type_unit} ADD INDEX field_key_unit_leader_nid  [success]
(field_key_unit_leader_nid)
ALTER TABLE {content_type_unit} ADD INDEX field_committee_chair_nid  [success]
(field_committee_chair_nid)
ALTER TABLE {content_type_unit} ADD INDEX field_unit_commissioner_nid[success]
(field_unit_commissioner_nid)
ALTER TABLE {content_field_place} ADD INDEX field_place_nid          [success]
(field_place_nid)
ALTER TABLE {content_field_contact} ADD INDEX field_contact_nid      [success]
(field_contact_nid)
ALTER TABLE {content_field_officeholder} ADD INDEX                   [success]
field_officeholder_nid (field_officeholder_nid)
ALTER TABLE {content_field_subordinate_unit_commissi} ADD INDEX      [success]
field_subordinate_unit_commissi_nid
(field_subordinate_unit_commissi_nid)
Finished performing updates.                                         [ok]
The following updates are pending:

 nodereference module
 6001 - Create an index by node reference column for all fields.

 userreference module
 6001 - Create an index by user reference column for all fields.

Do you wish to run all pending updates? (y/n): y
[hulk]$ drush updatedb
No database updates required                                         [success]
Finished performing updates.                                         [ok]
rsvelko’s picture

I noticed this bug too.

It should be an easy one for the pros.

rsvelko’s picture

The issue here is "What does drush have to do if no code updates available but only databases updates pending?"

Currently it auto-does the DB updates auto-filling the y/n prompt?

Is this by design and safe? I vote in favor of user-freedom to choose - so this prompt should ask and not auto-fill.

To test this module try to do jsut an updatecode command for a module and then run "drush update"

rsvelko’s picture

look here for the mkdir warnings - http://drupal.org/node/487990

moshe weitzman’s picture

Priority: Normal » Critical

Seems like a bug to me too. We should prompt. Patch wanted.

moshe weitzman’s picture

Status: Active » Fixed

The update command uses drush_invoke("updatecode") and then drush_backend_invoke('updatedb') for updatedb. Why this discrepency? The use of backend_invoke() suppresses the informative prompt for proceeding with db updates.

I have a feeling that we chose drush_backend_invoke() because of #539602: drush enable/disable can't be used with drush_invoke which was just fixed. So I am changing this one to drush_invoke() and now committing. If I am incorrect and this should be backend_invoke(), lets rollback and discuss.

Status: Fixed » Closed (fixed)

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

aren cambre’s picture

Version: All-Versions-2.0 » All-versions-3.0-beta1
Status: Closed (fixed) » Active

Still happening in 3.0-beta1. Below is what I just got. The "Do you wish to run all pending updates? (y/n)" prompt is after the updates happen, and y is autoentered.

Expected behavior: the prompt appears before updates are run but after description of updates is displayed.

$ drush update
Warning: The command name "update" is deprecated.  Please use a      [warning]
recommended form instead (pm-update,up).
Refreshing update status information ...
Done.
Update information last refreshed: Sun, 2010-03-21 13:28

Update status information on all installed and enabled Drupal projects:
 Name                            Installed      Proposed       Status
                                 version        version
 Administration menu             6.x-1.5        6.x-1.5        Up to date
 Admin block                     6.x-1.3        6.x-1.3        Up to date
 Automatic Nodetitles            6.x-1.2        6.x-1.2        Up to date
 Drupal                          6.16           6.16           Up to date
 Comment Notify                  6.x-1.4        6.x-1.4        Up to date
 Computed Field                  6.x-1.0-beta3  6.x-1.0-beta3  Up to date
 Content Templates               6.x-1.1        6.x-1.1        Up to date
 (Contemplate)
 Content Construction Kit (CCK)  6.x-2.6        6.x-2.6        Up to date
 Date                            6.x-2.4        6.x-2.4        Up to date
 Devel                           6.x-1.18       6.x-1.19       Update
                                                               available
 DHTML Menu                      6.x-3.5        6.x-3.5        Up to date
 Global Redirect                 6.x-1.2        6.x-1.2        Up to date
 Google Analytics                6.x-2.2        6.x-2.2        Up to date
 Term lower name                 6.x-1.1        6.x-1.1        Up to date
 Menu block                      6.x-2.2        6.x-2.2        Up to date
 Mollom                          6.x-1.12       6.x-1.12       Up to date
 Pathauto                        6.x-1.3        6.x-1.3        Up to date
 Poormanscron                    6.x-2.2        6.x-2.2        Up to date
 Table of Contents               6.x-3.4        6.x-3.4        Up to date
 Token                           6.x-1.12       6.x-1.12       Up to date
 Views                           6.x-2.8        6.x-2.8        Up to date
 Wysiwyg                         6.x-2.1        6.x-2.1        Up to date
 Zen                             6.x-2.x-dev    6.x-2.0-beta1  Up to date

Code updates will be made to the following projects:
Devel [devel-6.x-1.19]

Note: Updated projects can potentially break your site. It is NOT recommended to update production sites without prior testing.
Note: A backup of your package will be stored to backups directory if it is not managed by a supported version control system.
Note: If you have made any modifications to any file that belongs to one of these projects, you will have to migrate those modifications after updating.
Do you really want to continue? (y/n): y
Project devel was updated successfully. Installed version is now 6.x-1.19.
Backups were saved into the directory                                [ok]
/home/arencambre/drupal6/backup/modules/20100321112818/devel.
'all' cache was cleared                                              [success]
You have pending database updates. Please run `drush updatedb` or    [warning]
visit update.php in your browser.
Executing performance_update_6001                                    [success]
ALTER TABLE {performance_summary} CHANGE `millisecs_max` `ms_max` INT[success]
NOT NULL DEFAULT 0
ALTER TABLE {performance_summary} CHANGE `millisecs_avg` `ms_avg` INT[success]
NOT NULL DEFAULT 0
ALTER TABLE {performance_detail} CHANGE `millisecs` `ms` INT NOT NULL[success]
DEFAULT 0
Finished performing updates.                                         [ok]
The following updates are pending:

 performance module
 6001 - Harmonize notations for milliseconds to "ms".   @return array

Do you wish to run all pending updates? (y/n): y
greg.1.anderson’s picture

I noticed this too, but thought it was by design. Presumably, drush_invoke should be used instead of drush_backend_invoke for updatedb as was mentioned in #7.

moshe weitzman’s picture

Status: Active » Closed (won't fix)

I did commit the code as promised in #7 but rolled it back later. I forget why, but it was with some sadness. I think updatedb needed a fresh environment to work from and backend was the easiest way to achieve it.

If you want an interactive process, you should separate out your updatecode and then your updatedb. Calling this one won't fix.