diff --git a/wp-includes/default-constants.php b/wp-includes/default-constants.php
index 47b9cd7..688aac0 100644
--- a/wp-includes/default-constants.php
+++ b/wp-includes/default-constants.php
@@ -56,6 +56,9 @@ function wp_initial_constants( ) {
 	if ( !defined('WP_CACHE') )
 		define('WP_CACHE', false);
 
+	if ( !defined('WP_OPTION_LENGTH') )
+		define('WP_OPTION_LENGTH', 64);
+
 	/**
 	 * Private
 	 */
diff --git a/wp-includes/functions.php b/wp-includes/functions.php
index 0d458ef..052dab4 100644
--- a/wp-includes/functions.php
+++ b/wp-includes/functions.php
@@ -486,6 +486,11 @@ function wp_load_core_site_options( $site_id = null ) {
  * @return bool False if value was not updated and true if value was updated.
  */
 function update_option( $option, $newvalue ) {
+	if ( strlen($option) > WP_OPTION_LENGTH ) {
+		trigger_error( sprintf( __('update_option: Option name %1$s is longer than the maximum allowed length of %2$s.'), $option, WP_OPTION_LENGTH ), E_USER_WARNING );
+		return false;
+	}
+
 	global $wpdb;
 
 	$option = trim($option);
@@ -566,6 +571,11 @@ function update_option( $option, $newvalue ) {
  * @return null returns when finished.
  */
 function add_option( $option, $value = '', $deprecated = '', $autoload = 'yes' ) {
+	if ( strlen($option) > WP_OPTION_LENGTH ) {
+		trigger_error( sprintf( __('add_option: Option name %1$s is longer than the maximum allowed length of %2$s.'), $option, WP_OPTION_LENGTH ), E_USER_WARNING );
+		return false;
+	}
+
 	global $wpdb;
 
 	if ( !empty( $deprecated ) )
@@ -633,6 +643,11 @@ function add_option( $option, $value = '', $deprecated = '', $autoload = 'yes' )
  * @return bool True, if option is successfully deleted. False on failure.
  */
 function delete_option( $option ) {
+	if ( strlen($option) > WP_OPTION_LENGTH ) {
+		trigger_error( sprintf( __('delete_option: Option name %1$s is longer than the maximum allowed length of %2$s.'), $option, WP_OPTION_LENGTH ), E_USER_WARNING );
+		return false;
+	}
+
 	global $wpdb;
 
 	wp_protect_special_option( $option );
@@ -676,6 +691,11 @@ function delete_option( $option ) {
  * @return bool true if successful, false otherwise
  */
 function delete_transient( $transient ) {
+	if ( strlen('_transient_timeout_' . $transient) > WP_OPTION_LENGTH ) {
+		trigger_error( sprintf( __('delete_transient: Transient name %1$s is longer than the maximum allowed length of %2$s.'), $transient, (WP_OPTION_LENGTH - strlen('_transient_timeout_')) ), E_USER_WARNING );
+		return false;
+	}
+
 	global $_wp_using_ext_object_cache;
 
 	do_action( 'delete_transient_' . $transient, $transient );
@@ -715,6 +735,11 @@ function delete_transient( $transient ) {
  * @return mixed Value of transient
  */
 function get_transient( $transient ) {
+	if ( strlen('_transient_timeout_' . $transient) > WP_OPTION_LENGTH ) {
+		trigger_error( sprintf( __('get_transient: Transient name %1$s is longer than the maximum allowed length of %2$s.'), $transient, (WP_OPTION_LENGTH - strlen('_transient_timeout_')) ), E_USER_WARNING );
+		return false;
+	}
+
 	global $_wp_using_ext_object_cache;
 
 	$pre = apply_filters( 'pre_transient_' . $transient, false );
@@ -764,6 +789,11 @@ function get_transient( $transient ) {
  * @return bool False if value was not set and true if value was set.
  */
 function set_transient( $transient, $value, $expiration = 0 ) {
+	if ( strlen('_transient_timeout_' . $transient) > WP_OPTION_LENGTH ) {
+		trigger_error( sprintf( __('set_transient: Transient name %1$s is longer than the maximum allowed length of %2$s.'), $transient, (WP_OPTION_LENGTH - strlen('_transient_timeout_')) ), E_USER_WARNING );
+		return false;
+	}
+
 	global $_wp_using_ext_object_cache;
 
 	$value = apply_filters( 'pre_set_transient_' . $transient, $value );
