summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2003-08-28 22:18:02 +0300
committerunknown <monty@narttu.mysql.fi>2003-08-28 22:18:02 +0300
commit6fd5403d3105eb5df3e23a2dcf7ddd33a3589778 (patch)
treef39244679eaca00bb7f900f129b56e7b4c08528e /sql
parent6866b92331fa7badc3d5ee34d2663bb4cc369917 (diff)
downloadmariadb-git-6fd5403d3105eb5df3e23a2dcf7ddd33a3589778.tar.gz
Portability fixes
client/mysqltest.c: Removed not used functions myisam/mi_dynrec.c: Added assert to avoid compilation errors mysql-test/r/isam.result: Updated results after merge sql/log_event.cc: Cleanup sql/mysql_priv.h: Cleanup sql/sql_class.cc: Moved Table_ident functions to .cc file to allow them to use table_case_convert() sql/sql_class.h: Moved Table_ident functions to .cc file to allow them to use table_case_convert()
Diffstat (limited to 'sql')
-rw-r--r--sql/log_event.cc11
-rw-r--r--sql/mysql_priv.h4
-rw-r--r--sql/sql_class.cc23
-rw-r--r--sql/sql_class.h20
4 files changed, 36 insertions, 22 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 425b3c063d1..82e9c5950a7 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -2092,11 +2092,12 @@ int Start_log_event::exec_event(struct st_relay_log_info* rli)
*/
break;
case BINLOG_FORMAT_323_GEQ_57 :
- /* Can distinguish, based on the value of 'created' */
- if (!created)
- break;
- /* otherwise this was generated at master startup*/
- close_temporary_tables(thd);
+ /*
+ Can distinguish, based on the value of 'created',
+ which was generated at master startup.
+ */
+ if (created)
+ close_temporary_tables(thd);
break;
default :
/* this case is impossible */
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index 888651a7f65..22c92a5473b 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -846,18 +846,22 @@ inline bool add_item_to_list(Item *item)
{
return current_lex->select->item_list.push_back(item);
}
+
inline bool add_value_to_list(Item *value)
{
return current_lex->value_list.push_back(value);
}
+
inline bool add_order_to_list(Item *item,bool asc)
{
return add_to_list(current_lex->select->order_list,item,asc);
}
+
inline bool add_group_to_list(Item *item,bool asc)
{
return add_to_list(current_lex->select->group_list,item,asc);
}
+
inline void mark_as_null_row(TABLE *table)
{
table->null_row=1;
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 132e0d7745f..71aec69e49b 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -431,6 +431,29 @@ void THD::close_active_vio()
#endif
/*****************************************************************************
+ Table Ident
+****************************************************************************/
+
+
+Table_ident::Table_ident(LEX_STRING db_arg,LEX_STRING table_arg,bool force)
+ :table(table_arg)
+{
+ if (!force && (current_thd->client_capabilities & CLIENT_NO_SCHEMA))
+ db.str=0;
+ else
+ db= db_arg;
+ if (db.str)
+ table_case_convert(db.str,db.length);
+ table_case_convert(table.str,table.length);
+}
+
+Table_ident::Table_ident(LEX_STRING table_arg) :table(table_arg)
+{
+ db.str=0;
+ table_case_convert(table.str,table.length);
+}
+
+/*****************************************************************************
** Functions to provide a interface to select results
*****************************************************************************/
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 64a314911ec..abf69628d2c 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -33,7 +33,7 @@ enum enum_duplicates { DUP_ERROR, DUP_REPLACE, DUP_IGNORE };
enum enum_log_type { LOG_CLOSED, LOG_TO_BE_OPENED, LOG_NORMAL, LOG_NEW, LOG_BIN};
enum enum_delay_key_write { DELAY_KEY_WRITE_NONE, DELAY_KEY_WRITE_ON,
DELAY_KEY_WRITE_ALL };
-extern inline void table_case_convert(char * name, uint length);
+
/* log info errors */
#define LOG_INFO_EOF -1
#define LOG_INFO_IO -2
@@ -762,22 +762,8 @@ class Table_ident :public Sql_alloc {
public:
LEX_STRING db;
LEX_STRING table;
- inline Table_ident(LEX_STRING db_arg,LEX_STRING table_arg,bool force)
- :table(table_arg)
- {
- if (!force && (current_thd->client_capabilities & CLIENT_NO_SCHEMA))
- db.str=0;
- else
- db= db_arg;
- if (db.str)
- table_case_convert(db.str,db.length);
- table_case_convert(table.str,table.length);
- }
- inline Table_ident(LEX_STRING table_arg) :table(table_arg)
- {
- db.str=0;
- table_case_convert(table.str,table.length);
- }
+ Table_ident(LEX_STRING db_arg,LEX_STRING table_arg,bool force);
+ Table_ident(LEX_STRING table_arg);
inline void change_db(char *db_name)
{ db.str= db_name; db.length=(uint) strlen(db_name); }
};