1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Fix for Bug#30217: Views: changes in metadata behaviour

between 5.0 and 5.1.
  
The problem was that in the patch for Bug#11986 it was decided
to store original query in UTF8 encoding for the INFORMATION_SCHEMA.
This approach however turned out to be quite difficult to implement
properly. The main problem is to preserve the same IS-output after
dump/restore.
  
So, the fix is to rollback to the previous functionality, but also
to fix it to support multi-character-set-queries properly. The idea
is to generate INFORMATION_SCHEMA-query from the item-tree after
parsing view declaration. The IS-query should:
  - be completely in UTF8;
  - not contain character set introducers.
  
For more information, see WL4052.
This commit is contained in:
anozdrin/alik@quad.
2008-02-22 13:30:33 +03:00
parent 10dca4fd8d
commit 340906f46d
39 changed files with 709 additions and 380 deletions

View File

@ -49,14 +49,14 @@ static const char *lock_descriptions[] =
#ifndef DBUG_OFF
void
print_where(COND *cond,const char *info)
print_where(COND *cond,const char *info, enum_query_type query_type)
{
if (cond)
{
char buff[256];
String str(buff,(uint32) sizeof(buff), system_charset_info);
str.length(0);
cond->print(&str);
cond->print(&str, query_type);
str.append('\0');
DBUG_LOCK_FILE;
(void) fprintf(DBUG_FILE,"\nWHERE:(%s) ",info);
@ -143,7 +143,7 @@ void TEST_filesort(SORT_FIELD *sortorder,uint s_length)
else
{
str.length(0);
sortorder->item->print(&str);
sortorder->item->print(&str, QT_ORDINARY);
out.append(str);
}
}