Skip to content

antipaucity

fighting the lack of good ideas

mysql auto-changes data types

Posted on 14 June 2008 By antipaucity 1 Comment on mysql auto-changes data types

I was making a change to a small table today: adding a field that wanted to be a varchar. The other fields that were of type char all magically changed to varchar when I was done with the alter statement that added one field.

I don’t know if that’s supposed to happen, but it was serendipitous for me, as I wanted to change the char fields to varchar anyway.

And, interestingly enough, if you have a table full of varchar fields and you try to add a char field, it will automatically switch it to match the varchar form, and not switch the varchars back to char.

I didn’t see anything in a quick search on mysql’s website about this behavior, so it’s either undocumented, my google-fu is weak, or it’s a bug.

hmmm, huh, technical

Post navigation

Previous Post: burma allowing help… finally
Next Post: i love traveling

More Related Articles

a semi-permanent psa on passwords technical
don’t implement your scheduler in a pure queue design commentary
i’m surprised facebook doesn’t offer something akin to aws, gcp, azure, etc ideas
datacenter bandwidth charges can be crazy complaint
“like” problems: social ‘voting’ is a bad idea commentary
tesla’s cybertruck [almost] does two things i’ve said for a long time commentary

Comment (1) on “mysql auto-changes data types”

  1. Pingback: For innodb table in MySQL, which is faster: varchar(255) or tinytext? - oraerr.com

Comments are closed.

June 2008
S M T W T F S
1234567
891011121314
15161718192021
22232425262728
2930  
« May   Jul »
  • Patrick Henry 23 March 1775
  • Reincarnation by Wallace McCrae (adapted by Warren Myers)
  • Famed was Beowulf
  • Fuzzy Wuzzy (anonymous)
  • One bright morning in the middle of the night (various)

Books

  • Debugging and Supporting Software Systems
  • Storage Series

External

  • Backblaze
  • Cirkul
  • Digital Ocean
  • Fundrise
  • Great Big Purple Sign
  • Password Generator
  • PayPal
  • Tech News Channel on Telegram
  • Wish List

Other Blogs

  • Abiding in Hesed
  • Chris Agocs
  • Eric Hydrick
  • Jay Loden
  • Paragraph
  • skh:tec
  • Tech News Channel on Telegram
  • Veritas Equitas

Profiles

  • LinkedIn
  • Server Fault
  • Stack Overflow
  • Super User
  • Telegram
  • Twitter

Resume

  • LinkedIn
  • Resume (PDF)

Services

  • Datente
  • IP check
  • Password Generator
  • Tech News Channel on Telegram

Support

  • Backblaze
  • Built Bar
  • Cirkul
  • Digital Ocean
  • Donations
  • Fundrise
  • PayPal
  • Robinhood
  • Wish List

Copyright © 2023 antipaucity.

Powered by PressBook Green WordPress theme