~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_db.cc

  • Committer: Andrey Hristov
  • Date: 2008-08-06 00:04:45 UTC
  • mto: (264.1.5 codestyle)
  • mto: This revision was merged to the branch mainline in revision 266.
  • Revision ID: ahristov@mysql.com-20080806000445-84urmltikgwk9v5d
Constify the usage of CHARSET_INFO almost to the last place in the code.
99% of the parameters are const CHARSET_INFO * const cs.
Wherever possible stack variables are also double consted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
static bool rm_dir_w_symlink(const char *org_path, bool send_error);
36
36
static void mysql_change_db_impl(THD *thd,
37
37
                                 LEX_STRING *new_db_name,
38
 
                                 CHARSET_INFO *new_db_charset);
 
38
                                 const CHARSET_INFO * const new_db_charset);
39
39
 
40
40
 
41
41
/* Database lock hash */
102
102
{
103
103
  char *name;                   /* Database name                  */
104
104
  uint name_length;             /* Database length name           */
105
 
  CHARSET_INFO *charset;        /* Database default character set */
 
105
  const CHARSET_INFO *charset;  /* Database default character set */
106
106
} my_dbopt_t;
107
107
 
108
108
 
506
506
    set, even if the database does not exist.
507
507
*/
508
508
 
509
 
CHARSET_INFO *get_default_db_collation(THD *thd, const char *db_name)
 
509
const CHARSET_INFO *get_default_db_collation(THD *thd, const char *db_name)
510
510
{
511
511
  HA_CREATE_INFO db_info;
512
512
 
1129
1129
 
1130
1130
static void mysql_change_db_impl(THD *thd,
1131
1131
                                 LEX_STRING *new_db_name,
1132
 
                                 CHARSET_INFO *new_db_charset)
 
1132
                                 const CHARSET_INFO * const new_db_charset)
1133
1133
{
1134
1134
  /* 1. Change current database in THD. */
1135
1135
 
1294
1294
bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch)
1295
1295
{
1296
1296
  LEX_STRING new_db_file_name;
1297
 
  CHARSET_INFO *db_default_cl;
 
1297
  const CHARSET_INFO *db_default_cl;
1298
1298
 
1299
1299
  if (new_db_name == NULL ||
1300
1300
      new_db_name->length == 0)