Index: wp-admin/includes/upgrade.php
===================================================================
--- wp-admin/includes/upgrade.php	(revision 8028)
+++ wp-admin/includes/upgrade.php	(working copy)
@@ -4,6 +4,7 @@
 	require (WP_CONTENT_DIR . '/install.php');
 require_once(ABSPATH . 'wp-admin/includes/admin.php');
 require_once(ABSPATH . 'wp-admin/includes/schema.php');
+require_once(ABSPATH . 'wp-admin/install-helper.php');
 
 if ( !function_exists('wp_install') ) :
 function wp_install($blog_title, $user_name, $user_email, $public, $deprecated='') {
@@ -745,23 +746,6 @@
 // The functions we use to actually do stuff
 
 // General
-function maybe_create_table($table_name, $create_ddl) {
-	global $wpdb;
-	foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) {
-		if ($table == $table_name) {
-			return true;
-		}
-	}
-	//didn't find it try to create it.
-	$q = $wpdb->query($create_ddl);
-	// we cannot directly tell that whether this succeeded!
-	foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) {
-		if ($table == $table_name) {
-			return true;
-		}
-	}
-	return false;
-}
 
 function drop_index($table, $index) {
 	global $wpdb;
@@ -782,32 +766,6 @@
 	return true;
 }
 
-/**
- ** maybe_add_column()
- ** Add column to db table if it doesn't exist.
- ** Returns:  true if already exists or on successful completion
- **           false on error
- */
-function maybe_add_column($table_name, $column_name, $create_ddl) {
-	global $wpdb, $debug;
-	foreach ($wpdb->get_col("DESC $table_name", 0) as $column ) {
-		if ($debug) echo("checking $column == $column_name<br />");
-		if ($column == $column_name) {
-			return true;
-		}
-	}
-	//didn't find it try to create it.
-	$q = $wpdb->query($create_ddl);
-	// we cannot directly tell that whether this succeeded!
-	foreach ($wpdb->get_col("DESC $table_name", 0) as $column ) {
-		if ($column == $column_name) {
-			return true;
-		}
-	}
-	return false;
-}
-
-
 // get_alloptions as it was for 1.2.
 function get_alloptions_110() {
 	global $wpdb;
