List:Internals« Previous MessageNext Message »
From:Zhixuan Zhu Date:June 8 2009 10:08pm
Subject:trailing space in column name
View as plain text  
This may sound minor, but it creates lots of trouble to us. For some
reason MySQL disallow column names with trailing space in create table.
We're doing lots of "create table as select" type of queries and so
statements like this will fail:

Create table test as select "command ", command_type from command_table;

We plan to relax the trailing space limitation by modifying table.cc (we
build mysql 5.1.26 from source). Will that cause troubles else where?
Another option is that we can remove the trailing spaces in sql_table.cc
before the field name is passed to check_column_name(). But just
wondering why MySQL wouldn't do the same thing. Is there any pitfalls?

Thanks,
Zhixuan
Thread
trailing space in column nameZhixuan Zhu9 Jun
  • Re: trailing space in column nameIngo Strüwing9 Jun
    • RE: trailing space in column nameZhixuan Zhu9 Jun
      • RE: trailing space in column nameRick James9 Jun
        • RE: trailing space in column nameZhixuan Zhu9 Jun
          • RE: trailing space in column nameRick James9 Jun
            • RE: trailing space in column nameZhixuan Zhu9 Jun
  • Re: trailing space in column namePaul DuBois10 Jun
    • Re: trailing space in column nameKristian Nielsen11 Jun
      • Re: trailing space in column nameJoerg Bruehe11 Jun
        • Re: trailing space in column nameKristian Nielsen11 Jun
        • Re: trailing space in column nameRoy Lyseng11 Jun
  • Re: trailing space in column nameSergei Golubchik20 Jun