In hindsight, think I may have assumed the problem was MDL-27929 a little too hastily, sorry. Saw "unsigned" in the MySQL error and assumed that was the issue. I've got the same bug back again (looks like issues over the weekend were a snag with the database, actually). Full log at the bottom of this message, but it looks to me like an objection to making contextid not null. Just looked in the database and there's 562 cases where it's null.
I'm going to guess that's not meant to happen, and is really bad?
/var/www/moodle-2/admin/cli$ /usr/bin/php upgrade.php
== Upgrading Moodle database from version 2.0.3 (Build: 20110505) (2011033003) to 2.1beta (Build: 20110624) (2011062400) ==
-------------------------------------------------------------------------------
== Notice ==
You are going to install or upgrade Moodle to a version marked as "Beta"
that is not considered as production-ready yet. Please make sure this is intentional
and that you are using correct checkout of Moodle source code.
More help: http://docs.moodle.org/20/en/admin/versions
-------------------------------------------------------------------------------
Your Moodle files have been changed, and you are about to automatically
upgrade your server to this version:
2.1BETA (BUILD: 20110624) (2011062400)
Once you do this you can not go back again.
Please note that this process can take a long time.
Are you sure you want to upgrade this server to this version?
type y (means yes) or n (means no)
: y
-->System
Default exception handler: DDL sql execution error Debug: Data truncated for column 'contextid' at row 1
ALTER TABLE mdl_question_usages MODIFY COLUMN contextid BIGINT(10) unsigned NOT NULL after id
* line 399 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown
* line 655 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 88 of /lib/ddl/database_manager.php: call to mysqli_native_moodle_database->change_database_structure()
* line 75 of /lib/ddl/database_manager.php: call to database_manager->execute_sql()
* line 636 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()
* line 672 of /lib/ddl/database_manager.php: call to database_manager->change_field_type()
* line 6198 of /lib/db/upgrade.php: call to database_manager->change_field_notnull()
* line 1417 of /lib/upgradelib.php: call to xmldb_main_upgrade()
* line 141 of /admin/cli/upgrade.php: call to upgrade_core()
!!! DDL sql execution error !!!
!! Data truncated for column 'contextid' at row 1
ALTER TABLE mdl_question_usages MODIFY COLUMN contextid BIGINT(10) unsigned NOT NULL after id !!
!! Stack trace: * line 399 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown
* line 655 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 88 of /lib/ddl/database_manager.php: call to mysqli_native_moodle_database->change_database_structure()
* line 75 of /lib/ddl/database_manager.php: call to database_manager->execute_sql()
* line 636 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()
* line 672 of /lib/ddl/database_manager.php: call to database_manager->change_field_type()
* line 6198 of /lib/db/upgrade.php: call to database_manager->change_field_notnull()
* line 1417 of /lib/upgradelib.php: call to xmldb_main_upgrade()
* line 141 of /admin/cli/upgrade.php: call to upgrade_core()
!!