Below is the list of changes that have just been committed into a local
4.1 repository of monty. When monty does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2350 05/07/27 13:05:30 monty@stripped +5 -0
Review of new code:
Change argument order to be database, tablename for some functions
sql/unireg.cc
1.49 05/07/27 01:54:24 monty@stripped +6 -6
Change argument order to be database, tablename (like in most other functions)
sql/table.cc
1.131 05/07/27 01:54:24 monty@stripped +1 -1
Change argument order to be database, tablename (like in most other functions)
sql/sql_table.cc
1.296 05/07/27 01:54:24 monty@stripped +10 -9
Change argument order to be database, tablename (like in most other functions)
Make 'flags' inline
sql/mysql_priv.h
1.360 05/07/27 01:54:24 monty@stripped +3 -3
Change argument order to be database, tablename (like in most other functions)
sql/lock.cc
1.60 05/07/27 01:54:24 monty@stripped +2 -5
Remove not needed block
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: monty
# Host: narttu.mysql.com
# Root: /home/my/mysql-4.1
--- 1.59/sql/lock.cc 2005-07-21 04:53:07 +03:00
+++ 1.60/sql/lock.cc 2005-07-27 01:54:24 +03:00
@@ -584,12 +584,9 @@
DBUG_RETURN(-1);
}
+ if (remove_table_from_cache(thd, db, table_list->real_name, RTFC_NO_FLAG))
{
- if (remove_table_from_cache(thd, db,
- table_list->real_name, RTFC_NO_FLAG))
- {
- DBUG_RETURN(1); // Table is in use
- }
+ DBUG_RETURN(1); // Table is in use
}
DBUG_RETURN(0);
}
--- 1.359/sql/mysql_priv.h 2005-07-22 06:08:45 +03:00
+++ 1.360/sql/mysql_priv.h 2005-07-27 01:54:24 +03:00
@@ -1029,12 +1029,12 @@
void unireg_init(ulong options);
void unireg_end(void);
bool mysql_create_frm(THD *thd, my_string file_name,
- const char *table, const char* db,
+ const char *db, const char *table,
HA_CREATE_INFO *create_info,
List<create_field> &create_field,
uint key_count,KEY *key_info,handler *db_type);
int rea_create_table(THD *thd, my_string file_name,
- const char *table, const char* db,
+ const char *db, const char *table,
HA_CREATE_INFO *create_info,
List<create_field> &create_field,
uint key_count,KEY *key_info);
@@ -1107,7 +1107,7 @@
const char *newname);
ulong next_io_size(ulong pos);
void append_unescaped(String *res, const char *pos, uint length);
-int create_frm(char *name, const char *table, const char *db,
+int create_frm(char *name, const char *db, const char *table,
uint reclength,uchar *fileinfo,
HA_CREATE_INFO *create_info, uint keys);
void update_create_info_from_table(HA_CREATE_INFO *info, TABLE *form);
--- 1.295/sql/sql_table.cc 2005-07-22 06:08:45 +03:00
+++ 1.296/sql/sql_table.cc 2005-07-27 01:54:24 +03:00
@@ -220,7 +220,6 @@
for (table=tables ; table ; table=table->next)
{
char *db=table->db;
- uint flags;
mysql_ha_flush(thd, table, MYSQL_HA_CLOSE_FINAL);
if (!close_temporary_table(thd, db, table->real_name))
{
@@ -232,8 +231,9 @@
if (!drop_temporary)
{
abort_locked_tables(thd,db,table->real_name);
- flags= RTFC_WAIT_OTHER_THREAD_FLAG | RTFC_CHECK_KILLED_FLAG;
- remove_table_from_cache(thd,db,table->real_name,flags);
+ remove_table_from_cache(thd,db,table->real_name,
+ RTFC_WAIT_OTHER_THREAD_FLAG |
+ RTFC_CHECK_KILLED_FLAG);
drop_locked_tables(thd,db,table->real_name);
if (thd->killed)
DBUG_RETURN(-1);
@@ -1418,7 +1418,7 @@
create_info->data_file_name= create_info->index_file_name= 0;
create_info->table_options=db_options;
- if (rea_create_table(thd, path, table_name, db,
+ if (rea_create_table(thd, path, db, table_name,
create_info, fields, key_count,
key_info_buffer))
goto end;
@@ -1979,14 +1979,14 @@
/* Close all instances of the table to allow repair to rename files */
if (lock_type == TL_WRITE && table->table->version)
{
- uint flags;
pthread_mutex_lock(&LOCK_open);
const char *old_message=thd->enter_cond(&COND_refresh, &LOCK_open,
"Waiting to get writelock");
mysql_lock_abort(thd,table->table);
- flags= RTFC_WAIT_OTHER_THREAD_FLAG | RTFC_CHECK_KILLED_FLAG;
remove_table_from_cache(thd, table->table->table_cache_key,
- table->table->real_name, flags);
+ table->table->real_name,
+ RTFC_WAIT_OTHER_THREAD_FLAG |
+ RTFC_CHECK_KILLED_FLAG);
thd->exit_cond(old_message);
if (thd->killed)
goto err;
@@ -3410,9 +3410,10 @@
if (table)
{
VOID(table->file->extra(HA_EXTRA_FORCE_REOPEN)); // Use new file
+ /* Mark in-use copies old */
remove_table_from_cache(thd,db,table_name,RTFC_NO_FLAG);
- // Mark in-use copies old
- mysql_lock_abort(thd,table); // end threads waiting on lock
+ /* end threads waiting on lock */
+ mysql_lock_abort(thd,table);
}
VOID(quick_rm_table(old_db_type,db,old_name));
if (close_data_tables(thd,db,table_name) ||
--- 1.130/sql/table.cc 2005-07-22 06:08:45 +03:00
+++ 1.131/sql/table.cc 2005-07-27 01:54:24 +03:00
@@ -1238,7 +1238,7 @@
/* Create a .frm file */
-File create_frm(register my_string name, const char *table, const char *db,
+File create_frm(register my_string name, const char *db, const char *table,
uint reclength, uchar *fileinfo,
HA_CREATE_INFO *create_info, uint keys)
{
--- 1.48/sql/unireg.cc 2005-07-22 06:08:45 +03:00
+++ 1.49/sql/unireg.cc 2005-07-27 01:54:24 +03:00
@@ -56,8 +56,8 @@
mysql_create_frm()
thd Thread handler
file_name Name of file (including database and .frm)
- table Name of table
db Name of database
+ table Name of table
create_info create info parameters
create_fields Fields to create
keys number of keys to create
@@ -70,7 +70,7 @@
*/
bool mysql_create_frm(THD *thd, my_string file_name,
- const char *table, const char *db,
+ const char *db, const char *table,
HA_CREATE_INFO *create_info,
List<create_field> &create_fields,
uint keys, KEY *key_info,
@@ -117,7 +117,7 @@
reclength=uint2korr(forminfo+266);
null_fields=uint2korr(forminfo+282);
- if ((file=create_frm(file_name, table, db, reclength, fileinfo,
+ if ((file=create_frm(file_name, db, table, reclength, fileinfo,
create_info, keys)) < 0)
{
my_free((gptr) screen_buff,MYF(0));
@@ -219,8 +219,8 @@
rea_create_table()
thd Thread handler
file_name Name of file (including database and .frm)
- table Name of table
db Name of database
+ table Name of table
create_info create info parameters
create_fields Fields to create
keys number of keys to create
@@ -233,14 +233,14 @@
*/
int rea_create_table(THD *thd, my_string file_name,
- const char *table, const char *db,
+ const char *db, const char *table,
HA_CREATE_INFO *create_info,
List<create_field> &create_fields,
uint keys, KEY *key_info)
{
DBUG_ENTER("rea_create_table");
- if (mysql_create_frm(thd, file_name, table, db, create_info,
+ if (mysql_create_frm(thd, file_name, db, table, create_info,
create_fields, keys, key_info, NULL))
DBUG_RETURN(1);
if (ha_create_table(file_name,create_info,0))
| Thread |
|---|
| • bk commit into 4.1 tree (monty:1.2350) | monty | 27 Jul |