diff options
author | Timothy Smith <timothy.smith@sun.com> | 2008-12-14 13:52:47 -0700 |
---|---|---|
committer | Timothy Smith <timothy.smith@sun.com> | 2008-12-14 13:52:47 -0700 |
commit | 3d2d2d0c17b6a67c9fb3a82856a7d88c27462bee (patch) | |
tree | 93cd94d9d4243338142d7b970eaeddf0d4229fd0 /storage | |
parent | 3692ae364e9f0b4086d41da454fea6c38c79c9ac (diff) | |
download | mariadb-git-3d2d2d0c17b6a67c9fb3a82856a7d88c27462bee.tar.gz |
Apply InnoDB snapshot innodb-5.1-ss2858, part 12.
A follow-up to fix for bug #39438. This moves some errro messages from the
server error log to the client, to make it easier for users (especially in
shared hosting environment) to get info about why their statement is failing.
Detailed revision comments:
r2832 | vasil | 2008-10-21 10:08:30 +0300 (Tue, 21 Oct 2008) | 10 lines
branches/5.1:
In ha_innobase::info():
Replace sql_print_warning() which prints to mysqld error log with
push_warning_printf() which sends the error message to the client.
Suggested by: Marko, Sunny, Michael
Objected by: Inaam
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index b573e5ba79b..c91ccf36863 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -5952,12 +5952,21 @@ ha_innobase::info( ib_table->space) * 1024; } else { - sql_print_warning( - "Trying to get the free space for " - "table %s but its tablespace has " - "been discarded or the .ibd file " - "is missing. Setting the free space " - "to zero.", ib_table->name); + THD* thd; + + thd = ha_thd(); + + push_warning_printf( + thd, + MYSQL_ERROR::WARN_LEVEL_WARN, + ER_CANT_GET_STAT, + "InnoDB: Trying to get the free " + "space for table %s but its " + "tablespace has been discarded or " + "the .ibd file is missing. Setting " + "the free space to zero.", + ib_table->name); + stats.delete_length = 0; } |