Index: src/wp-includes/option.php
===================================================================
--- src/wp-includes/option.php	(revision 36221)
+++ src/wp-includes/option.php	(working copy)
@@ -250,10 +250,16 @@
 function update_option( $option, $value, $autoload = null ) {
 	global $wpdb;
 
-	$option = trim($option);
-	if ( empty($option) )
+	$option = trim( $option );
+
+	if ( empty( $option ) ) {
 		return false;
+	}
 
+	if ( 191 < mb_strlen( $option ) ) {
+		_doing_it_wrong( __FUNCTION__, __( 'The option name is longer than 191 which is what can be stored in the options table.' ), '4.5' );
+	}
+
 	wp_protect_special_option( $option );
 
 	if ( is_object( $value ) )
@@ -395,13 +401,20 @@
 function add_option( $option, $value = '', $deprecated = '', $autoload = 'yes' ) {
 	global $wpdb;
 
-	if ( !empty( $deprecated ) )
+	if ( !empty( $deprecated ) ) {
 		_deprecated_argument( __FUNCTION__, '2.3' );
+	}
 
-	$option = trim($option);
-	if ( empty($option) )
+	$option = trim( $option );
+	
+	if ( empty( $option ) ) {
 		return false;
+	}
 
+	if ( 191 < mb_strlen( $option ) ) {
+		_doing_it_wrong( __FUNCTION__, __( 'The option name is longer than 191 which is what can be stored in the options table.' ), '4.5' );
+	}
+
 	wp_protect_special_option( $option );
 
 	if ( is_object($value) )
@@ -713,6 +726,11 @@
 	} else {
 		$transient_timeout = '_transient_timeout_' . $transient;
 		$transient_option = '_transient_' . $transient;
+
+		if ( 191 < mb_strlen( $transient_option ) || 191 < mb_strlen( $transient_timeout ) ) {
+			_doing_it_wrong( __FUNCTION__, __( 'The transient name is longer than 172 which is what can be stored in the options table.' ), '4.5' );
+		}
+
 		if ( false === get_option( $transient_option ) ) {
 			$autoload = 'yes';
 			if ( $expiration ) {
