diff options
-rw-r--r-- | myisam/mi_test3.c | 2 | ||||
-rw-r--r-- | myisam/rt_test.c | 2 | ||||
-rw-r--r-- | sql/sql_class.cc | 6 | ||||
-rw-r--r-- | sql/sql_class.h | 4 |
4 files changed, 11 insertions, 3 deletions
diff --git a/myisam/mi_test3.c b/myisam/mi_test3.c index defe041a99f..63cea4f715d 100644 --- a/myisam/mi_test3.c +++ b/myisam/mi_test3.c @@ -207,7 +207,7 @@ void start_test(int id) { mi_status(file1,&isam_info,HA_STATUS_VARIABLE); printf("%2d: End of test. Records: %ld Deleted: %ld\n", - id,isam_info.records,isam_info.deleted); + id,(long) isam_info.records, (long) isam_info.deleted); fflush(stdout); } diff --git a/myisam/rt_test.c b/myisam/rt_test.c index f5fd2018f01..8bb4687e967 100644 --- a/myisam/rt_test.c +++ b/myisam/rt_test.c @@ -297,7 +297,7 @@ int run_test(const char *filename) create_record1(record, nrecords*4/5); print_record(record,0,"\n"); hrows=mi_records_in_range(file,0,record+1,0,HA_READ_MBR_INTERSECT,record+1,0,0); - printf(" %ld rows\n",hrows); + printf(" %ld rows\n", (long) hrows); if (mi_close(file)) goto err; diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 0b8e6a192b4..8fd507c2349 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -36,6 +36,12 @@ #endif #include <mysys_err.h> +/* + The following is used to initialise Table_ident with a internal + table name +*/ +char internal_table_name[2]= "*"; + /***************************************************************************** ** Instansiate templates diff --git a/sql/sql_class.h b/sql/sql_class.h index 8284a2b1ea3..b196990d7c0 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -34,6 +34,8 @@ enum enum_log_type { LOG_CLOSED, LOG_NORMAL, LOG_NEW, LOG_BIN }; enum enum_delay_key_write { DELAY_KEY_WRITE_NONE, DELAY_KEY_WRITE_ON, DELAY_KEY_WRITE_ALL }; +extern char internal_table_name[2]; + // log info errors #define LOG_INFO_EOF -1 #define LOG_INFO_IO -2 @@ -900,7 +902,7 @@ class Table_ident :public Sql_alloc inline Table_ident(SELECT_LEX_UNIT *s) : sel(s) { /* We must have a table name here as this is used with add_table_to_list */ - db.str=0; table.str=(char *)"*"; table.length=1; + db.str=0; table.str= internal_table_name; table.length=1; } inline void change_db(char *db_name) { |