diff options
author | monty@mishka.local <> | 2005-07-31 12:49:55 +0300 |
---|---|---|
committer | monty@mishka.local <> | 2005-07-31 12:49:55 +0300 |
commit | 8437e9c1be5b925a46640302a391af9c9cf83a30 (patch) | |
tree | c4df327e7bc6c594e03c6454dddbc63a93203c6a /sql/sql_view.cc | |
parent | e60d786dde7bfec95a16967bb57d8c570af8ac9e (diff) | |
download | mariadb-git-8437e9c1be5b925a46640302a391af9c9cf83a30.tar.gz |
Fixes during review of new pushed code
Change bool in C code to my_bool
Added to mysqltest --enable_parsning and --disable_parsing to avoid to have to comment parts of tests
Added comparison of LEX_STRING's and use this to compare file types for view and trigger files.
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r-- | sql/sql_view.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc index a60bf80a6d8..c7f2047aac6 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -24,6 +24,8 @@ #define MD5_BUFF_LENGTH 33 +const LEX_STRING view_type= { (char*) STRING_WITH_LEN("VIEW") }; + static int mysql_register_view(THD *thd, TABLE_LIST *view, enum_view_create_mode mode); @@ -431,7 +433,7 @@ static File_option view_parameters[]= FILE_OPTIONS_STRING} }; -static LEX_STRING view_file_type[]= {{(char*)"VIEW", 4}}; +static LEX_STRING view_file_type[]= {{(char*) STRING_WITH_LEN("VIEW") }}; /* @@ -470,7 +472,7 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view, thd->variables.sql_mode|= sql_mode; } str.append('\0'); - DBUG_PRINT("VIEW", ("View: %s", str.ptr())); + DBUG_PRINT("info", ("View: %s", str.ptr())); /* print file name */ (void) my_snprintf(dir_buff, FN_REFLEN, "%s/%s/", @@ -507,8 +509,7 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view, if (!(parser= sql_parse_prepare(&path, thd->mem_root, 0))) DBUG_RETURN(1); - if (!parser->ok() || - strncmp("VIEW", parser->type()->str, parser->type()->length)) + if (!parser->ok() || !is_equal(&view_type, parser->type())) { my_error(ER_WRONG_OBJECT, MYF(0), (view->db ? view->db : thd->db), view->table_name, "VIEW"); |