| 1110 | } |
| 1111 | |
| 1112 | bool is_like_pre(char * field_ptr) { |
| 1113 | bool meet_space = false; |
| 1114 | char *substr = strdup(" LIKE"); |
| 1115 | char *s = strcasestr(field_ptr, substr); |
| 1116 | if (s != NULL) { |
| 1117 | int i; |
| 1118 | for (i = 0; i < strlen(s); i++) { |
| 1119 | if (!meet_space) { |
| 1120 | if (s[i] == ' ' && i > 0) { |
| 1121 | meet_space = true; |
| 1122 | } |
| 1123 | } else { |
| 1124 | if (s[i] != ' ') { |
| 1125 | return s[i + 1] == '%' ? true : false; |
| 1126 | } |
| 1127 | } |
| 1128 | } |
| 1129 | } |
| 1130 | if(substr) free(substr); |
| 1131 | return false; |
| 1132 | } |
| 1133 | |
| 1134 | bool is_not_tmp_table(TABLE_LIST * table){ |
| 1135 | if (strcasecmp(table->db,"") == 0 && strcasecmp(table->table_name,"*") == 0){ |