summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2011-04-04 16:04:15 +0300
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2011-04-04 16:04:15 +0300
commit5321b3a57a5191471cba0db85a11e21fb702200a (patch)
tree307b729117f4c6f8ffe2631cb81b30e19968f70c /mysys
parentd2d7aa480067ed12b2d18e04be3652a071ee3626 (diff)
downloadmariadb-git-5321b3a57a5191471cba0db85a11e21fb702200a.tar.gz
Bug #11758687: 50924: object names not resolved correctly
on lctn2 systems There was a local variable in get_all_tables() to store the "original" value of the database name as it can get lowercased depending on the lower_case_table_name value. get_all_tables() iterates over database names and for each database iterates over the tables in it. The "original" db name was assigned in the table names loop. Thus the first table is ok, but the second and subsequent tables get the lowercased name from processing the first table. Fixed by moving the assignment of the original database name from the inner (table name) to the outer (database name) loop. Test suite added.
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_net.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/mysys/my_net.c b/mysys/my_net.c
index e2cc0679134..820abf32386 100644
--- a/mysys/my_net.c
+++ b/mysys/my_net.c
@@ -111,11 +111,12 @@ extern pthread_mutex_t LOCK_gethostbyname_r;
is finished with the structure.
*/
-struct hostent *my_gethostbyname_r(const char *name,
- struct hostent *result __attribute__((unused)),
- char *buffer __attribute__((unused)),
- int buflen __attribute__((unused)),
- int *h_errnop)
+struct hostent *
+my_gethostbyname_r(const char *name,
+ struct hostent *result __attribute__((unused)),
+ char *buffer __attribute__((unused)),
+ int buflen __attribute__((unused)),
+ int *h_errnop)
{
struct hostent *hp;
pthread_mutex_lock(&LOCK_gethostbyname_r);