Commit 3c2ac1fc authored by unknown's avatar unknown
Browse files

Merge bk-internal.mysql.com:/home/bk/mysql-5.0

into mysql.com:/home/dlenev/src/mysql-5.0-merges

parents 84536761 70dfda88
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1052,3 +1052,6 @@ vio/test-ssl
vio/test-sslclient
vio/test-sslserver
vio/viotest-ssl
include/mysqld_ername.h
include/mysqld_error.h
include/sql_state.h
+1 −0
Original line number Diff line number Diff line
@@ -241,6 +241,7 @@ tonu@x153.internalnet
tonu@x3.internalnet
tsmith@build.mysql.com
tulin@build.mysql.com
tulin@mysql.com
ulli@morbus.(none)
venu@hundin.mysql.fi
venu@myvenu.com
+0 −4
Original line number Diff line number Diff line
@@ -27,9 +27,5 @@ EXTRA_DIST =
all:
	:

# Nothing to cleanup in this dummy directory.
clean:
	:

# Don't update the files from bitkeeper
%::SCCS/s.%
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@

#AUTOMAKE_OPTIONS =              nostdinc
INCLUDES =			-I$(top_srcdir)/include -I$(top_srcdir)/regex \
				$(openssl_includes) -I$(top_srcdir)/extra
				$(openssl_includes) -I$(top_builddir)/include
LIBS =				@CLIENT_LIBS@
LDADD=				@CLIENT_EXTRA_LDFLAGS@ \
                                $(top_builddir)/libmysql/libmysqlclient.la
+40 −3
Original line number Diff line number Diff line
@@ -2186,6 +2186,38 @@ static my_bool dump_all_views_in_db(char *database)
  return 0;
} /* dump_all_tables_in_db */

/*
  get_actual_table_name -- executes a SHOW TABLES LIKE '%s' to get the actual 
  table name from the server for the table name given on the command line.  
  we do this because the table name given on the command line may be a 
  different case (e.g.  T1 vs t1)
  
  RETURN
    void
*/
static void get_actual_table_name( const char *old_table_name, 
                                         char *new_table_name, 
                                         int buf_size )
{
    MYSQL_RES  *tableRes;
    MYSQL_ROW  row;
    char query[ NAME_LEN + 50 ];

    DBUG_ENTER("get_actual_table_name");

	sprintf( query, "SHOW TABLES LIKE '%s'", old_table_name );
    if (mysql_query_with_error_report(sock, 0, query))
    {
        safe_exit(EX_MYSQLERR);
    }

	tableRes = mysql_store_result( sock );
    row = mysql_fetch_row( tableRes );
	strncpy( new_table_name, row[0], buf_size );
    mysql_free_result(tableRes);
} /* get_actual_table_name */


static int dump_selected_tables(char *db, char **table_names, int tables)
{
  uint numrows;
@@ -2219,9 +2251,14 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
    print_xml_tag1(md_result_file, "", "database name=", db, "\n");
  for (i=0 ; i < tables ; i++)
  {
    numrows = getTableStructure(table_names[i], db);
    if (!dFlag && numrows > 0)
      dumpTable(numrows, table_names[i]);
     char new_table_name[NAME_LEN];

     /* the table name passed on commandline may be wrong case */
     get_actual_table_name( table_names[i], new_table_name, sizeof(new_table_name) );

    numrows = getTableStructure(new_table_name, db);

    dumpTable(numrows, new_table_name);
    my_free(order_by, MYF(MY_ALLOW_ZERO_PTR));
    order_by= 0;
  }
Loading