1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

pointer casts -> int4store()

added error code to master failed connect message


BitKeeper/etc/ignore:
  Added libmysql_r/acconfig.h libmysql_r/array.c libmysql_r/bchange.c libmysql_r/bmove.c libmysql_r/bmove_upp.c libmysql_r/charset.c libmysql_r/conf_to_src.c libmysql_r/ctype_autoconf.c libmysql_r/ctype-big5.c libmysql_r/ctype.c libmysql_r/ctype-czech.c libmysql_r/ctype-euc_kr.c libmysql_r/ctype-gb2312.c libmysql_r/ctype-gbk.c libmysql_r/ctype-sjis.c libmysql_r/ctype-tis620.c libmysql_r/ctype-ujis.c libmysql_r/dbug.c libmysql_r/default.c libmysql_r/dll.c libmysql_r/errmsg.c libmysql_r/errors.c libmysql_r/getopt1.c libmysql_r/getopt.c libmysql_r/get_password.c libmysql_r/getvar.c libmysql_r/int2str.c libmysql_r/is_prefix.c libmysql_r/libmysql.c libmysql_r/list.c libmysql_r/llstr.c libmysql_r/longlong2str.c libmysql_r/mf_casecnv.c libmysql_r/mf_dirname.c libmysql_r/mf_fn_ext.c libmysql_r/mf_format.c libmysql_r/mf_loadpath.c libmysql_r/mf_pack.c libmysql_r/mf_path.c libmysql_r/mf_tempfile.c libmysql_r/mf_unixpath.c libmysql_r/mf_wcomp.c libmysql_r/mulalloc.c libmysql_r/my_alloc.c libmysql_r/my_compress.c libm
sql/share/romanian/errmsg.sys:
  touched again
sql/slave.cc:
  print error code on failed connects
sql/sql_base.cc:
  use int4store() instead of direct ponter casts
libmysql_r/acconfig.h:
  ***MISSING WEAVE***
This commit is contained in:
unknown
2000-11-27 23:08:46 -07:00
parent d95ec59726
commit c5a8038661
4 changed files with 99 additions and 12 deletions

View File

@ -446,11 +446,10 @@ void close_temporary_tables(THD *thd)
{
if(query) // we might be out of memory, but this is not fatal
{
p = strmov(p,table->table_cache_key); // here we assume it always starts
p = strxmov(p,table->table_cache_key,".",
table->table_name,",", NullS);
// here we assume table_cache_key always starts
// with \0 terminated db name
*p++ = '.';
p = strmov(p,table->table_name);
*p++ = ',';
}
next=table->next;
close_temporary(table);
@ -474,7 +473,7 @@ TABLE **find_temporary_table(THD *thd, const char *db, const char *table_name)
uint key_length= (uint) (strmov(strmov(key,db)+1,table_name)-key)+1;
TABLE *table,**prev;
*((ulong*)(key+key_length)) = thd->slave_proxy_id;
int4store(key+key_length,thd->slave_proxy_id);
key_length += 4;
prev= &thd->temporary_tables;
@ -514,7 +513,7 @@ bool rename_temporary_table(THD* thd, TABLE *table, const char *db,
(strmov((table->real_name=strmov(table->table_cache_key=key,
db)+1),
table_name) - table->table_cache_key)+1;
*((ulong*)(key+table->key_length)) = thd->slave_proxy_id;
int4store(key+table->key_length,thd->slave_proxy_id);
table->key_length += 4;
return 0;
}
@ -669,7 +668,7 @@ TABLE *open_table(THD *thd,const char *db,const char *table_name,
if (thd->killed)
DBUG_RETURN(0);
key_length= (uint) (strmov(strmov(key,db)+1,table_name)-key)+1;
*((ulong*)(key + key_length)) = thd->slave_proxy_id;
int4store(key + key_length, thd->slave_proxy_id);
key_length += 4;
for (table=thd->temporary_tables; table ; table=table->next)
@ -1413,8 +1412,8 @@ TABLE *open_temporary_table(THD *thd, const char *path, const char *db,
tmp_table->key_length= (uint) (strmov(strmov(tmp_table->table_cache_key,db)
+1, table_name)
- tmp_table->table_cache_key)+1;
*((ulong*)(tmp_table->table_cache_key + tmp_table->key_length)) =
thd->slave_proxy_id;
int4store(tmp_table->table_cache_key + tmp_table->key_length,
thd->slave_proxy_id);
tmp_table->key_length += 4;
if (link_in_list)