List:Commits« Previous MessageNext Message »
From:Jon Olav Hauglid Date:October 29 2010 3:00pm
Subject:bzr commit into mysql-next-mr-bugfixing branch (jon.hauglid:3349) Bug#57035
View as plain text  
#At file:///export/home/x/mysql-next-mr-bugfixing-bug57035/ based on revid:tor.didriksen@stripped

 3349 Jon Olav Hauglid	2010-10-29
      Bug #57035 'ulonglong sql_mode' stored into ulong, is risky
                 and causes compiler warning
      
      In 5.5 THD::variables::sql_mode was changed from ulong to
      ulonglong. The problem was that several variables used to
      store sql_mode were still declared as ulong. This patch
      updates these declarations to ulonglong.
      
      No test case added.

    modified:
      sql/event_data_objects.cc
      sql/event_data_objects.h
      sql/event_db_repository.cc
      sql/log_event.cc
      sql/log_event.h
      sql/partition_info.cc
      sql/sp.cc
      sql/sp.h
      sql/sp_head.cc
      sql/sp_head.h
      sql/sql_acl.cc
      sql/sql_cache.cc
      sql/sql_cache.h
      sql/sql_insert.cc
      sql/sql_show.cc
      sql/sql_table.cc
      sql/sql_trigger.cc
      sql/sql_trigger.h
      sql/sql_view.cc
=== modified file 'sql/event_data_objects.cc'
--- a/sql/event_data_objects.cc	2010-07-27 15:01:56 +0000
+++ b/sql/event_data_objects.cc	2010-10-29 15:00:08 +0000
@@ -431,7 +431,7 @@ Event_job_data::load_from_row(THD *thd,
   definer_host.str= strmake_root(&mem_root, ptr + 1, len);
   definer_host.length= len;
 
-  sql_mode= (ulong) table->field[ET_FIELD_SQL_MODE]->val_int();
+  sql_mode= (ulonglong) table->field[ET_FIELD_SQL_MODE]->val_int();
 
   DBUG_RETURN(FALSE);
 }
@@ -638,7 +638,7 @@ Event_timed::load_from_row(THD *thd, TAB
   else
     comment.length= 0;
 
-  sql_mode= (ulong) table->field[ET_FIELD_SQL_MODE]->val_int();
+  sql_mode= (ulonglong) table->field[ET_FIELD_SQL_MODE]->val_int();
 
   DBUG_RETURN(FALSE);
 }

=== modified file 'sql/event_data_objects.h'
--- a/sql/event_data_objects.h	2010-07-02 18:15:21 +0000
+++ b/sql/event_data_objects.h	2010-10-29 15:00:08 +0000
@@ -139,7 +139,7 @@ public:
   ulonglong created;
   ulonglong modified;
 
-  ulong sql_mode;
+  ulonglong sql_mode;
 
   class Stored_program_creation_ctx *creation_ctx;
   LEX_STRING body_utf8;
@@ -165,7 +165,7 @@ public:
   LEX_STRING definer_user;
   LEX_STRING definer_host;
 
-  ulong sql_mode;
+  ulonglong sql_mode;
 
   class Stored_program_creation_ctx *creation_ctx;
 

=== modified file 'sql/event_db_repository.cc'
--- a/sql/event_db_repository.cc	2010-08-20 08:48:59 +0000
+++ b/sql/event_db_repository.cc	2010-10-29 15:00:08 +0000
@@ -622,7 +622,7 @@ Event_db_repository::create_event(THD *t
   int ret= 1;
   TABLE *table= NULL;
   sp_head *sp= thd->lex->sphead;
-  ulong saved_mode= thd->variables.sql_mode;
+  ulonglong saved_mode= thd->variables.sql_mode;
 
   DBUG_ENTER("Event_db_repository::create_event");
 
@@ -734,7 +734,7 @@ Event_db_repository::update_event(THD *t
   CHARSET_INFO *scs= system_charset_info;
   TABLE *table= NULL;
   sp_head *sp= thd->lex->sphead;
-  ulong saved_mode= thd->variables.sql_mode;
+  ulonglong saved_mode= thd->variables.sql_mode;
   int ret= 1;
 
   DBUG_ENTER("Event_db_repository::update_event");
@@ -997,7 +997,7 @@ Event_db_repository::load_named_event(TH
                                       LEX_STRING name, Event_basic *etn)
 {
   bool ret;
-  ulong saved_mode= thd->variables.sql_mode;
+  ulonglong saved_mode= thd->variables.sql_mode;
   Open_tables_backup open_tables_backup;
   TABLE_LIST event_table;
 

=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc	2010-10-27 14:46:44 +0000
+++ b/sql/log_event.cc	2010-10-29 15:00:08 +0000
@@ -2297,7 +2297,7 @@ bool Query_log_event::write(IO_CACHE* fi
   if (sql_mode_inited)
   {
     *start++= Q_SQL_MODE_CODE;
-    int8store(start, (ulonglong)sql_mode);
+    int8store(start, sql_mode);
     start+= 8;
   }
   if (catalog_len) // i.e. this var is inited (false for 4.0 events)
@@ -2625,7 +2625,7 @@ Query_log_event::Query_log_event(THD* th
   else
     cache_type= Log_event::EVENT_STMT_CACHE;
   DBUG_ASSERT(cache_type != Log_event::EVENT_INVALID_CACHE);
-  DBUG_PRINT("info",("Query_log_event has flags2: %lu  sql_mode: %lu",
+  DBUG_PRINT("info",("Query_log_event has flags2: %lu  sql_mode: %llu",
                      (ulong) flags2, sql_mode));
 }
 #endif /* MYSQL_CLIENT */
@@ -2840,7 +2840,7 @@ Query_log_event::Query_log_event(const c
 #endif
       CHECK_SPACE(pos, end, 8);
       sql_mode_inited= 1;
-      sql_mode= (ulong) uint8korr(pos); // QQ: Fix when sql_mode is ulonglong
+      sql_mode= uint8korr(pos);
       DBUG_PRINT("info",("In Query_log_event, read sql_mode: %s",
 			 llstr(sql_mode, buff)));
       pos+= 8;
@@ -3312,8 +3312,8 @@ int Query_log_event::do_apply_event(Rela
       */
       if (sql_mode_inited)
         thd->variables.sql_mode=
-          (ulong) ((thd->variables.sql_mode & MODE_NO_DIR_IN_CREATE) |
-                   (sql_mode & ~(ulong) MODE_NO_DIR_IN_CREATE));
+          (ulonglong) ((thd->variables.sql_mode & MODE_NO_DIR_IN_CREATE) |
+                       (sql_mode & ~(ulonglong) MODE_NO_DIR_IN_CREATE));
       if (charset_inited)
       {
         if (rli->cached_charset_compare(charset))

=== modified file 'sql/log_event.h'
--- a/sql/log_event.h	2010-10-21 13:05:32 +0000
+++ b/sql/log_event.h	2010-10-29 15:00:08 +0000
@@ -680,7 +680,7 @@ typedef struct st_print_event_info
   bool flags2_inited;
   uint32 flags2;
   bool sql_mode_inited;
-  ulong sql_mode;		/* must be same as THD.variables.sql_mode */
+  ulonglong sql_mode;		/* must be same as THD.variables.sql_mode */
   ulong auto_increment_increment, auto_increment_offset;
   bool charset_inited;
   char charset[6]; // 3 variables, each of them storable in 2 bytes
@@ -1704,7 +1704,7 @@ public:
 
   uint32 flags2;
   /* In connections sql_mode is 32 bits now but will be 64 bits soon */
-  ulong sql_mode;
+  ulonglong sql_mode;
   ulong auto_increment_increment, auto_increment_offset;
   char charset[6];
   uint time_zone_len; /* 0 means uninited */

=== modified file 'sql/partition_info.cc'
--- a/sql/partition_info.cc	2010-10-01 16:11:50 +0000
+++ b/sql/partition_info.cc	2010-10-29 15:00:08 +0000
@@ -2156,7 +2156,7 @@ bool partition_info::fix_column_value_fu
       {
         uchar *val_ptr;
         uint len= field->pack_length();
-        ulong save_sql_mode;
+        ulonglong save_sql_mode;
         bool save_got_warning;
 
         if (!(column_item= get_column_item(column_item,

=== modified file 'sql/sp.cc'
--- a/sql/sp.cc	2010-10-25 12:13:13 +0000
+++ b/sql/sp.cc	2010-10-29 15:00:08 +0000
@@ -42,11 +42,11 @@ create_string(THD *thd, String *buf,
 	      st_sp_chistics *chistics,
               const LEX_STRING *definer_user,
               const LEX_STRING *definer_host,
-              ulong sql_mode);
+              ulonglong sql_mode);
 
 static int
 db_load_routine(THD *thd, int type, sp_name *name, sp_head **sphp,
-                ulong sql_mode, const char *params, const char *returns,
+                ulonglong sql_mode, const char *params, const char *returns,
                 const char *body, st_sp_chistics &chistics,
                 const char *definer, longlong created, longlong modified,
                 Stored_program_creation_ctx *creation_ctx);
@@ -539,7 +539,7 @@ db_find_routine(THD *thd, int type, sp_n
   char buff[65];
   String str(buff, sizeof(buff), &my_charset_bin);
   bool saved_time_zone_used= thd->time_zone_used;
-  ulong sql_mode, saved_mode= thd->variables.sql_mode;
+  ulonglong sql_mode, saved_mode= thd->variables.sql_mode;
   Open_tables_backup open_tables_state_backup;
   Stored_program_creation_ctx *creation_ctx;
 
@@ -636,7 +636,7 @@ db_find_routine(THD *thd, int type, sp_n
   modified= table->field[MYSQL_PROC_FIELD_MODIFIED]->val_int();
   created= table->field[MYSQL_PROC_FIELD_CREATED]->val_int();
 
-  sql_mode= (ulong) table->field[MYSQL_PROC_FIELD_SQL_MODE]->val_int();
+  sql_mode= (ulonglong) table->field[MYSQL_PROC_FIELD_SQL_MODE]->val_int();
 
   table->field[MYSQL_PROC_FIELD_COMMENT]->val_str(&str, &str);
 
@@ -713,11 +713,11 @@ Silence_deprecated_warning::handle_condi
     @retval   0                     error
 */
 
-static sp_head *sp_compile(THD *thd, String *defstr, ulong sql_mode,
+static sp_head *sp_compile(THD *thd, String *defstr, ulonglong sql_mode,
                            Stored_program_creation_ctx *creation_ctx)
 {
   sp_head *sp;
-  ulong old_sql_mode= thd->variables.sql_mode;
+  ulonglong old_sql_mode= thd->variables.sql_mode;
   ha_rows old_select_limit= thd->variables.select_limit;
   sp_rcontext *old_spcont= thd->spcont;
   Silence_deprecated_warning warning_handler;
@@ -758,7 +758,7 @@ static sp_head *sp_compile(THD *thd, Str
 
 static int
 db_load_routine(THD *thd, int type, sp_name *name, sp_head **sphp,
-                ulong sql_mode, const char *params, const char *returns,
+                ulonglong sql_mode, const char *params, const char *returns,
                 const char *body, st_sp_chistics &chistics,
                 const char *definer, longlong created, longlong modified,
                 Stored_program_creation_ctx *creation_ctx)
@@ -924,7 +924,7 @@ sp_create_routine(THD *thd, int type, sp
   int ret;
   TABLE *table;
   char definer[USER_HOST_BUFF_SIZE];
-  ulong saved_mode= thd->variables.sql_mode;
+  ulonglong saved_mode= thd->variables.sql_mode;
 
   CHARSET_INFO *db_cs= get_default_db_collation(thd, sp->m_db.str);
 
@@ -1990,9 +1990,9 @@ create_string(THD *thd, String *buf,
               st_sp_chistics *chistics,
               const LEX_STRING *definer_user,
               const LEX_STRING *definer_host,
-              ulong sql_mode)
+              ulonglong sql_mode)
 {
-  ulong old_sql_mode= thd->variables.sql_mode;
+  ulonglong old_sql_mode= thd->variables.sql_mode;
   /* Make some room to begin with */
   if (buf->alloc(100 + dblen + 1 + namelen + paramslen + returnslen + bodylen +
 		 chistics->comment.length + 10 /* length of " DEFINER= "*/ +
@@ -2074,7 +2074,7 @@ create_string(THD *thd, String *buf,
 
 sp_head *
 sp_load_for_information_schema(THD *thd, TABLE *proc_table, String *db,
-                               String *name, ulong sql_mode, int type,
+                               String *name, ulonglong sql_mode, int type,
                                const char *returns, const char *params,
                                bool *free_sp_head)
 {

=== modified file 'sql/sp.h'
--- a/sql/sp.h	2010-10-22 12:37:58 +0000
+++ b/sql/sp.h	2010-10-29 15:00:08 +0000
@@ -176,7 +176,7 @@ TABLE *open_proc_table_for_read(THD *thd
 
 sp_head *
 sp_load_for_information_schema(THD *thd, TABLE *proc_table, String *db,
-                               String *name, ulong sql_mode, int type,
+                               String *name, ulonglong sql_mode, int type,
                                const char *returns, const char *params,
                                bool *free_sp_head);
 

=== modified file 'sql/sp_head.cc'
--- a/sql/sp_head.cc	2010-10-27 10:28:09 +0000
+++ b/sql/sp_head.cc	2010-10-29 15:00:08 +0000
@@ -1204,7 +1204,7 @@ sp_head::execute(THD *thd, bool merge_da
   sp_rcontext *ctx= thd->spcont;
   bool err_status= FALSE;
   uint ip= 0;
-  ulong save_sql_mode;
+  ulonglong save_sql_mode;
   bool save_abort_on_warning;
   Query_arena *old_arena;
   /* per-instruction arena */
@@ -2477,7 +2477,7 @@ sp_head::do_cont_backpatch()
 
 void
 sp_head::set_info(longlong created, longlong modified,
-                  st_sp_chistics *chistics, ulong sql_mode)
+                  st_sp_chistics *chistics, ulonglong sql_mode)
 {
   m_created= created;
   m_modified= modified;

=== modified file 'sql/sp_head.h'
--- a/sql/sp_head.h	2010-10-26 11:50:55 +0000
+++ b/sql/sp_head.h	2010-10-29 15:00:08 +0000
@@ -172,7 +172,7 @@ public:
 
   const char *m_tmp_query;	///< Temporary pointer to sub query string
   st_sp_chistics *m_chistics;
-  ulong m_sql_mode;		///< For SHOW CREATE and execution
+  ulonglong m_sql_mode;         ///< For SHOW CREATE and execution
   LEX_STRING m_qname;		///< db.name
   bool m_explicit_name;         ///< Prepend the db name? */
   LEX_STRING m_db;
@@ -394,7 +394,7 @@ public:
                              Create_field *field_def);
 
   void set_info(longlong created, longlong modified,
-		st_sp_chistics *chistics, ulong sql_mode);
+		st_sp_chistics *chistics, ulonglong sql_mode);
 
   void set_definer(const char *definer, uint definerlen);
   void set_definer(const LEX_STRING *user_name, const LEX_STRING *host_name);

=== modified file 'sql/sql_acl.cc'
--- a/sql/sql_acl.cc	2010-10-27 10:47:14 +0000
+++ b/sql/sql_acl.cc	2010-10-29 15:00:08 +0000
@@ -696,7 +696,7 @@ static my_bool acl_load(THD *thd, TABLE_
   bool check_no_resolve= specialflag & SPECIAL_NO_RESOLVE;
   char tmp_name[NAME_LEN+1];
   int password_length;
-  ulong old_sql_mode= thd->variables.sql_mode;
+  ulonglong old_sql_mode= thd->variables.sql_mode;
   DBUG_ENTER("acl_load");
 
   thd->variables.sql_mode&= ~MODE_PAD_CHAR_TO_FULL_LENGTH;
@@ -4267,7 +4267,7 @@ static my_bool grant_load(THD *thd, TABL
   bool check_no_resolve= specialflag & SPECIAL_NO_RESOLVE;
   MEM_ROOT **save_mem_root_ptr= my_pthread_getspecific_ptr(MEM_ROOT**,
                                                            THR_MALLOC);
-  ulong old_sql_mode= thd->variables.sql_mode;
+  ulonglong old_sql_mode= thd->variables.sql_mode;
   DBUG_ENTER("grant_load");
 
   thd->variables.sql_mode&= ~MODE_PAD_CHAR_TO_FULL_LENGTH;
@@ -6469,7 +6469,7 @@ bool mysql_drop_user(THD *thd, List <LEX
   List_iterator <LEX_USER> user_list(list);
   TABLE_LIST tables[GRANT_TABLES];
   bool some_users_deleted= FALSE;
-  ulong old_sql_mode= thd->variables.sql_mode;
+  ulonglong old_sql_mode= thd->variables.sql_mode;
   bool save_binlog_row_based;
   DBUG_ENTER("mysql_drop_user");
 

=== modified file 'sql/sql_cache.cc'
--- a/sql/sql_cache.cc	2010-10-12 10:15:42 +0000
+++ b/sql/sql_cache.cc	2010-10-29 15:00:08 +0000
@@ -1222,7 +1222,7 @@ void Query_cache::store_query(THD *thd,
     DBUG_PRINT("qcache", ("\
 long %d, 4.1: %d, bin_proto: %d, more results %d, pkt_nr: %d, \
 CS client: %u, CS result: %u, CS conn: %u, limit: %lu, TZ: 0x%lx, \
-sql mode: 0x%lx, sort len: %lu, conncat len: %lu, div_precision: %lu, \
+sql mode: 0x%llx, sort len: %lu, conncat len: %lu, div_precision: %lu, \
 def_week_frmt: %lu, in_trans: %d, autocommit: %d",
                           (int)flags.client_long_flag,
                           (int)flags.client_protocol_41,
@@ -1564,7 +1564,7 @@ Query_cache::send_result_to_client(THD *
   DBUG_PRINT("qcache", ("\
 long %d, 4.1: %d, bin_proto: %d, more results %d, pkt_nr: %d, \
 CS client: %u, CS result: %u, CS conn: %u, limit: %lu, TZ: 0x%lx, \
-sql mode: 0x%lx, sort len: %lu, conncat len: %lu, div_precision: %lu, \
+sql mode: 0x%llx, sort len: %lu, conncat len: %lu, div_precision: %lu, \
 def_week_frmt: %lu, in_trans: %d, autocommit: %d",
                           (int)flags.client_long_flag,
                           (int)flags.client_protocol_41,

=== modified file 'sql/sql_cache.h'
--- a/sql/sql_cache.h	2010-07-02 02:58:51 +0000
+++ b/sql/sql_cache.h	2010-10-29 15:00:08 +0000
@@ -532,7 +532,7 @@ struct Query_cache_query_flags
   uint collation_connection_num;
   ha_rows limit;
   Time_zone *time_zone;
-  ulong sql_mode;
+  ulonglong sql_mode;
   ulong max_sort_length;
   ulong group_concat_max_len;
   ulong default_week_format;

=== modified file 'sql/sql_insert.cc'
--- a/sql/sql_insert.cc	2010-10-27 14:46:44 +0000
+++ b/sql/sql_insert.cc	2010-10-29 15:00:08 +0000
@@ -1832,7 +1832,7 @@ public:
   char *record;
   enum_duplicates dup;
   time_t start_time;
-  ulong sql_mode;
+  ulonglong sql_mode;
   bool auto_increment_field_not_null;
   bool query_start_used, ignore, log_query, binlog_rows_query_log_events;
   bool stmt_depends_on_first_successful_insert_id_in_prev_stmt;

=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc	2010-10-27 10:28:09 +0000
+++ b/sql/sql_show.cc	2010-10-29 15:00:08 +0000
@@ -4481,7 +4481,7 @@ bool store_schema_params(THD *thd, TABLE
               &returns);
 
   sp= sp_load_for_information_schema(thd, proc_table, &sp_db, &sp_name,
-                                     (ulong) proc_table->
+                                     (ulonglong) proc_table->
                                      field[MYSQL_PROC_FIELD_SQL_MODE]->val_int(),
                                      routine_type,
                                      returns.c_ptr_safe(),
@@ -4637,7 +4637,7 @@ bool store_schema_proc(THD *thd, TABLE *
         bool free_sp_head;
         proc_table->field[MYSQL_PROC_FIELD_RETURNS]->val_str(&returns);
         sp= sp_load_for_information_schema(thd, proc_table, &sp_db, &sp_name,
-                                           (ulong) proc_table->
+                                           (ulonglong) proc_table->
                                            field[MYSQL_PROC_FIELD_SQL_MODE]->
                                            val_int(),
                                            TYPE_ENUM_FUNCTION,
@@ -5098,7 +5098,7 @@ static bool store_trigger(THD *thd, TABL
                           enum trg_event_type event,
                           enum trg_action_time_type timing,
                           LEX_STRING *trigger_stmt,
-                          ulong sql_mode,
+                          ulonglong sql_mode,
                           LEX_STRING *definer_buffer,
                           LEX_STRING *client_cs_name,
                           LEX_STRING *connection_cl_name,
@@ -5167,7 +5167,7 @@ static int get_schema_triggers_record(TH
       {
         LEX_STRING trigger_name;
         LEX_STRING trigger_stmt;
-        ulong sql_mode;
+        ulonglong sql_mode;
         char definer_holder[USER_HOST_BUFF_SIZE];
         LEX_STRING definer_buffer;
         LEX_STRING client_cs_name;

=== modified file 'sql/sql_table.cc'
--- a/sql/sql_table.cc	2010-10-27 10:28:09 +0000
+++ b/sql/sql_table.cc	2010-10-29 15:00:08 +0000
@@ -7025,7 +7025,7 @@ copy_data_between_tables(TABLE *from,TAB
   List<Item>   all_fields;
   ha_rows examined_rows;
   bool auto_increment_field_copied= 0;
-  ulong save_sql_mode;
+  ulonglong save_sql_mode;
   ulonglong prev_insert_id;
   DBUG_ENTER("copy_data_between_tables");
 

=== modified file 'sql/sql_trigger.cc'
--- a/sql/sql_trigger.cc	2010-10-01 10:23:16 +0000
+++ b/sql/sql_trigger.cc	2010-10-29 15:00:08 +0000
@@ -1307,7 +1307,7 @@ bool Table_triggers_list::check_n_load(T
       List_iterator_fast<LEX_STRING> it_db_cl_name(triggers->db_cl_names);
       LEX *old_lex= thd->lex, lex;
       sp_rcontext *save_spcont= thd->spcont;
-      ulong save_sql_mode= thd->variables.sql_mode;
+      ulonglong save_sql_mode= thd->variables.sql_mode;
       LEX_STRING *on_table_name;
 
       thd->lex= &lex;
@@ -1513,7 +1513,7 @@ bool Table_triggers_list::get_trigger_in
                                            trg_action_time_type time_type,
                                            LEX_STRING *trigger_name,
                                            LEX_STRING *trigger_stmt,
-                                           ulong *sql_mode,
+                                           ulonglong *sql_mode,
                                            LEX_STRING *definer,
                                            LEX_STRING *client_cs_name,
                                            LEX_STRING *connection_cl_name,
@@ -1754,7 +1754,7 @@ Table_triggers_list::change_table_name_i
 {
   char path_buff[FN_REFLEN];
   LEX_STRING *def, *on_table_name, new_def;
-  ulong save_sql_mode= thd->variables.sql_mode;
+  ulonglong save_sql_mode= thd->variables.sql_mode;
   List_iterator_fast<LEX_STRING> it_def(definitions_list);
   List_iterator_fast<LEX_STRING> it_on_table_name(on_table_names_list);
   List_iterator_fast<ulonglong> it_mode(definition_modes_list);

=== modified file 'sql/sql_trigger.h'
--- a/sql/sql_trigger.h	2010-10-01 10:23:16 +0000
+++ b/sql/sql_trigger.h	2010-10-29 15:00:08 +0000
@@ -136,7 +136,7 @@ public:
   bool get_trigger_info(THD *thd, trg_event_type event,
                         trg_action_time_type time_type,
                         LEX_STRING *trigger_name, LEX_STRING *trigger_stmt,
-                        ulong *sql_mode,
+                        ulonglong *sql_mode,
                         LEX_STRING *definer,
                         LEX_STRING *client_cs_name,
                         LEX_STRING *connection_cl_name,

=== modified file 'sql/sql_view.cc'
--- a/sql/sql_view.cc	2010-08-30 06:38:09 +0000
+++ b/sql/sql_view.cc	2010-10-29 15:00:08 +0000
@@ -844,7 +844,7 @@ static int mysql_register_view(THD *thd,
   view_query.length(0);
   is_query.length(0);
   {
-    ulong sql_mode= thd->variables.sql_mode & MODE_ANSI_QUOTES;
+    ulonglong sql_mode= thd->variables.sql_mode & MODE_ANSI_QUOTES;
     thd->variables.sql_mode&= ~MODE_ANSI_QUOTES;
 
     lex->unit.print(&view_query, QT_ORDINARY);
@@ -1229,7 +1229,7 @@ bool mysql_make_view(THD *thd, File_pars
     view_select= &lex->select_lex;
     view_select->select_number= ++thd->select_number;
 
-    ulong saved_mode= thd->variables.sql_mode;
+    ulonglong saved_mode= thd->variables.sql_mode;
     /* switch off modes which can prevent normal parsing of VIEW
       - MODE_REAL_AS_FLOAT            affect only CREATE TABLE parsing
       + MODE_PIPES_AS_CONCAT          affect expression parsing


Attachment: [text/bzr-bundle] bzr/jon.hauglid@oracle.com-20101029150008-s8hi48eer5g7efov.bundle
Thread
bzr commit into mysql-next-mr-bugfixing branch (jon.hauglid:3349) Bug#57035Jon Olav Hauglid29 Oct
  • Re: bzr commit into mysql-next-mr-bugfixing branch(jon.hauglid:3349) Bug#57035Konstantin Osipov29 Oct