summaryrefslogtreecommitdiff
path: root/sql/unireg.cc
diff options
context:
space:
mode:
authormonty@mashka.mysql.fi <>2002-10-02 13:33:08 +0300
committermonty@mashka.mysql.fi <>2002-10-02 13:33:08 +0300
commitd69250a969449da43891ef5b2859df77917183a8 (patch)
tree5a27bda6d3f628af7dcb922ad022e84cf8cb351c /sql/unireg.cc
parent7134ffec210edde21860a2b2c2654be481de49b4 (diff)
downloadmariadb-git-d69250a969449da43891ef5b2859df77917183a8.tar.gz
Fixes and code cleanups after merge with 4.0.3
Warning handling and initial prepared statement handling (last not complete yet) Changed a lot of functions that returned 0/1 to my_bool type. GRANT handling now uses read/write locks instead of mutex Change basic net functions to use THD instead of NET (needed for 4.1 protocol) Use my_sprintf instead of sprintf() + strlen() Added alloc_query() to be able to chare query initialization code with prepared statements. Cleanup handling of SHOW COUNT(*) WARNINGS and SELECT LAST_INSERT_ID() Note that the following test fails (will be fixed ASAP): sub_select, union, rpl_rotate_logs and rpl_mystery22
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r--sql/unireg.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc
index 8db9b871a39..344583b56f1 100644
--- a/sql/unireg.cc
+++ b/sql/unireg.cc
@@ -46,7 +46,7 @@ static bool make_empty_rec(int file, enum db_type table_type,
uint reclength,uint null_fields);
-int rea_create_table(my_string file_name,
+int rea_create_table(THD *thd, my_string file_name,
HA_CREATE_INFO *create_info,
List<create_field> &create_fields,
uint keys, KEY *key_info)
@@ -67,13 +67,12 @@ int rea_create_table(my_string file_name,
if (pack_header(forminfo, create_info->db_type,create_fields,info_length,
screens, create_info->table_options, db_file))
{
- NET *net=my_pthread_getspecific_ptr(NET*,THR_NET);
my_free((gptr) screen_buff,MYF(0));
- if (net->last_errno != ER_TOO_MANY_FIELDS)
+ if (thd->net.last_errno != ER_TOO_MANY_FIELDS)
DBUG_RETURN(1);
// Try again without UNIREG screens (to get more columns)
- net->last_error[0]=0;
+ thd->net.last_error[0]=0;
if (!(screen_buff=pack_screens(create_fields,&info_length,&screens,1)))
DBUG_RETURN(1);
if (pack_header(forminfo, create_info->db_type, create_fields,info_length,