Commit 3db93f80 authored by unknown's avatar unknown

lower_case_table_names=2 (Keep case for table names) was not honored

with ALTER TABLE and CREATE/DROP INDEX. (Bug #3109)
Make net_buffer_length visible for mysql clients (Bug #4206)


include/mysql.h:
  Make net_buffer_length visible for mysql clients
libmysql/libmysql.c:
  Make net_buffer_length visible for mysql clients
mysql-test/mysql-test-run.sh:
  Don't give warning for some common 'safe' warnings
mysql-test/r/lowercase_table2.result:
  Test name conversion with ALTER TABLE / CREATE INDEX (Bug #3109)
mysql-test/t/lowercase_table2.test:
  Test name conversion with ALTER TABLE / CREATE INDEX (Bug #3109)
scripts/mysql_install_db.sh:
  Removed not used variable
sql/sql_table.cc:
  lower_case_table_names=2 (Keep case for table names) was not honored
  with ALTER TABLE and CREATE/DROP INDEX. (Bug #3109)
parent 5fa063ba
......@@ -250,7 +250,7 @@ typedef struct st_mysql_parameters
unsigned long *p_net_buffer_length;
} MYSQL_PARAMETERS;
#if !defined(MYSQL_CLIENT) && !defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY)
#if !defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY)
#define max_allowed_packet (*mysql_get_parameters()->p_max_allowed_packet)
#define net_buffer_length (*mysql_get_parameters()->p_net_buffer_length)
#endif
......
......@@ -59,6 +59,8 @@
#define INADDR_NONE -1
#endif
#undef net_buffer_length
#undef max_allowed_packet
static my_bool mysql_client_init=0;
uint mysql_port=0;
my_string mysql_unix_port=0;
......
......@@ -668,7 +668,7 @@ report_stats () {
#
$RM -f $MY_LOG_DIR/warnings $MY_LOG_DIR/warnings.tmp
# Remove some non fatal warnings from the log files
$SED -e 's!Warning: Table:.* on delete!!g' \
$SED -e 's!Warning: Table:.* on delete!!g' -e 's!Warning: Setting lower_case_table_names=2!!g' -e 's!Warning: One can only use the --user.*root!!g' \
$MY_LOG_DIR/*.err > $MY_LOG_DIR/warnings.tmp
found_error=0
......
......@@ -121,3 +121,13 @@ LOCATION
Mic-5
Mic-6
drop table T1;
create table T1 (A int);
alter table T1 add index (A);
show tables like 'T1%';
Tables_in_test (T1%)
T1
alter table t1 add index (A);
show tables like 't1%';
Tables_in_test (t1%)
t1
drop table t1;
......@@ -89,3 +89,14 @@ SELECT LOCATION FROM T1 WHERE EVENT_ID=2 UNION ALL SELECT LOCATION FROM T1 WHER
SELECT LOCATION FROM T1 WHERE EVENT_ID=2 UNION ALL SELECT LOCATION FROM T1 WHERE EVENT_ID=3;
SELECT LOCATION FROM T1 WHERE EVENT_ID=2 UNION ALL SELECT LOCATION FROM T1 WHERE EVENT_ID=3;
drop table T1;
#
# Test name conversion with ALTER TABLE / CREATE INDEX (Bug #3109)
#
create table T1 (A int);
alter table T1 add index (A);
show tables like 'T1%';
alter table t1 add index (A);
show tables like 't1%';
drop table t1;
......@@ -342,7 +342,7 @@ fi
echo "Installing all prepared tables"
if eval "$mysqld $defaults $mysqld_opt --bootstrap --skip-grant-tables \
--basedir=$basedir --datadir=$ldata --skip-innodb --skip-bdb \
$extra_arg $args" << END_OF_DATA
$args" << END_OF_DATA
use mysql;
$c_d
$i_d
......
......@@ -1545,7 +1545,10 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
}
}
else
new_alias= new_name= table_name;
{
new_alias= (lower_case_table_names == 2) ? alias : table_name;
new_name= table_name;
}
old_db_type=table->db_type;
if (create_info->db_type == DB_TYPE_DEFAULT)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment