<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 01/18/2015 03:48 AM, Kevin Johnson
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAN1HqxzNf5u4Jeg15QPg3fvgFAsQ_mPbApzMawQ8-XyGY+U6AQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi Adam,
        <div><br>
        </div>
        <div>It turns out that by default, MySQL on windows is case
          insensitive for table names, and case sensitive when installed
          in linux.  To make the MySQL server case insensitive in linux,
          edit the my.cnf file and place lower_case_table_names = 1
          after the [mysqld].  Then restart mysql.  You must first
          rename all the tables to use lower case--so this is best done
          before you put anything in the database.</div>
        <div><br>
        </div>
        <div>I think using all lower case table names would be
          recommended, so that the code is portable from windows to
          linux.</div>
      </div>
    </blockquote>
    <br>
    Yeah, it doesn't sound nice to ask everyone to tweak their MySQL
    config to make Ur/Web work.  You may have been able to infer that I
    don't use Ur/Web with MySQL by choice personally, so it's easy to
    miss some change like this one in the latest MySQL that breaks
    things!  (It definitely worked a few years back.)<br>
    <br>
    <blockquote
cite="mid:CAN1HqxzNf5u4Jeg15QPg3fvgFAsQ_mPbApzMawQ8-XyGY+U6AQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>But even so, if you do a "strings urblog.exe" you will find
          that the table is referenced by both mixed case and lower
          case.  It seems like it just checks the existence of the lower
          case named tables, as any data I put in them was ignored.  It
          used the data from the table with the mixed case name.  I hope
          that gives you a hint on where to look.  I should also note
          that the urblog.sql file contained the mixed case table names.</div>
      </div>
    </blockquote>
    <br>
    I've changed the compiler to, I hope, use all-lowercase names
    everywhere for MySQL.  That change is pushed to the public Mercurial
    repo for Ur/Web.  Please let me know if it doesn't work you now,
    too.  (Thanks for the clear explanation of the problem!)<br>
    <br>
    <blockquote
cite="mid:CAN1HqxzNf5u4Jeg15QPg3fvgFAsQ_mPbApzMawQ8-XyGY+U6AQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>Kevin Johnson</div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Sat, Jan 17, 2015 at 6:39 PM, Adam
          Chlipala <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:adamc@csail.mit.edu" target="_blank">adamc@csail.mit.edu</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> Probably the
              underlying problem here is that MySQL is relatively
              underused and thus untested with Ur/Web!  If you compile
              with 'urweb -debug', you will see all of the SQL strings
              that are being used, some in /tmp/webapp.c.  Can you tell
              me the right case to use everywhere?  (I <i>think</i>
              case is at least being used consistently throughout the
              generated code, so apparently MySQL applies a case
              preference automatically somewhere.  Also, I'm pretty sure
              the main demo has worked with MySQL recently, so maybe
              some element of your configuration is nonstandard, e.g.
              the filesystem?)
              <div>
                <div class="h5"><br>
                  <br>
                  <div>On 01/17/2015 02:23 PM, Kevin Johnson wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <div dir="ltr">When I try to execute the examples
                      from Gian Perrone's web tutorial, I get the
                      following error:
                      <div><br>
                      </div>
                      <div>Fatal initialization error: Table
                        'uw_urblog_comment' does not exist.</div>
                      <div><br>
                      </div>
                      <div>I am running mysql 5.5 on a ubuntu system.</div>
                      <div><br>
                      </div>
                      <div>The urblog.sql defined the table as
                        'uw_Urblog_comment'.</div>
                      <div><br>
                      </div>
                      <div>I have tried modifying the sql file to use
                        'uw_urblog_comment', but then the urblog.exe
                        complains that 'uw_Urblog_comment' doesn't
                        exist.</div>
                      <div><br>
                      </div>
                      <div>I have to have both table names in the
                        database.  Is there perhaps an ignore table name
                        case flag I am missing somewhere that everyone
                        uses?</div>
                      <div><br>
                      </div>
                      <div>Thank you,</div>
                      <div><br>
                      </div>
                      <div>Kevin Johnson</div>
                    </div>
                  </blockquote>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
      </div>
    </blockquote>
  </body>
</html>