~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzledump.cc

  • Committer: Brian Aker
  • Date: 2008-09-05 22:16:26 UTC
  • mto: This revision was merged to the branch mainline in revision 383.
  • Revision ID: brian@tangent.org-20080905221626-nc631ypag04am60c
Big, fat, UTF-8 patch. This fixes some of the oddities around only one
charset.

Show diffs side-by-side

added added

removed removed

Lines of Context:
558
558
    }
559
559
    if (opt_set_charset)
560
560
      fprintf(sql_file,
561
 
"\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;"
562
 
"\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;"
563
561
"\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;"
564
562
"\n/*!40101 SET NAMES %s */;\n",default_charset);
565
563
 
601
599
    }
602
600
    if (opt_set_charset)
603
601
      fprintf(sql_file,
604
 
"/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n"
605
 
"/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n"
606
602
"/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n");
607
603
    fprintf(sql_file,
608
604
            "/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n");
1590
1586
          }
1591
1587
 
1592
1588
          fprintf(sql_file,
1593
 
                  "SET @saved_cs_client     = @@character_set_client;\n"
1594
 
                  "SET character_set_client = utf8;\n"
1595
1589
                  "/*!50001 CREATE TABLE %s (\n",
1596
1590
                  result_table);
1597
1591
 
1612
1606
            fprintf(sql_file, ",\n  %s %s",
1613
1607
                    quote_name(row[0], name_buff, 0), row[1]);
1614
1608
          }
1615
 
          fprintf(sql_file,
1616
 
                  "\n) */;\n"
1617
 
                  "SET character_set_client = @saved_cs_client;\n");
1618
 
 
 
1609
          fprintf(sql_file, "\n) */;\n"); 
1619
1610
          check_io(sql_file);
1620
1611
        }
1621
1612
 
1630
1621
 
1631
1622
      row= drizzle_fetch_row(result);
1632
1623
 
1633
 
      fprintf(sql_file,
1634
 
              "SET @saved_cs_client     = @@character_set_client;\n"
1635
 
              "SET character_set_client = utf8;\n"
1636
 
              "%s;\n"
1637
 
              "SET character_set_client = @saved_cs_client;\n",
1638
 
              row[1]);
 
1624
      fprintf(sql_file, "%s;\n", row[1]);
1639
1625
 
1640
1626
      check_io(sql_file);
1641
1627
      drizzle_free_result(result);