Lueckenotte: Earthnail: tinyint uses 1 byte
Foersterling: Earthnail: See http://dev.mysql.com/doc/refman/5.6/en/storage-requirements.html
Devreese: Naktibalda: yes, indeed it does. When you “select into outfile”, however, it is stored as ASCII text. With a range of 0 to 255, you need three ASCII characters one or two of them usually being whitespace.
Leedy: Naktibalda: Sorry, I have no idea about that function.
Riffe: I’d love to store them in the outfile as a regular 1-byte tinyint, not as ascii characters.
Tio: Earthnail, into outfile will usually not add the whitespaces for values 100
Rocconi: Earthnail: See http://dev.mysql.com/doc/refman/5.6/en/string-functions.html#function_ord
Liebl: Http://pastie.org/private/6yor3ghjj6e2clkagtia
Wooden: Earthnail: See http://dev.mysql.com/doc/refman/5.6/en/string-functions.html#function_char
Norg: Naktibalda: char might indeed do it =
Spacek: You could use this to get one byte, but it will wrapped in quotes, so you are back or up to 3 bytes
Liebl: If I insert something that has no matching row in element the foreign key constraint seems to fail
Liebl: Why, null should be all right?
Voigtlander: Liebl: yes, if the field is not NOT NULL
Otterbein: Are you inserting NULL?
Liebl: It’s a migration from legacy system
Liebl: And some legacy components do insert 0’s even when null should be used
Liebl: So insert foo sn,ty,num,stamp,id,element_id values 1, ‘X’, 3, now, 0, 0; produces a constraint violation
Liebl: Even with the trigger
Meusel: Naktibalda: it actually uses four bytes, one for the char and three whitespace characters
Meskill: Earthnail: have you set ZEROFILL attribute?
Galeana: How can p*** a bash variable in a command like this: mysql -BNe ” select * from $mytable”?
Sueda: Earthnail: The optionally defined number after an INT data type represents the display width when used in conjunction with ZEROFILL. Please refer to: http://hashmysql.org/wiki/Zerofill
Aholt: Mathys: That’s bash question
Pound: Oh thanks I thought was a mysql question sorry :
Berlinghof: Naktibalda: I just set it, but it seems this property is lost when converting to char.
Chean: Earthnail: you are probably getting extra whitespace because you had it set
Bairam: Naktibalda: I set the whitespace to 3, not 4. I get a different amount of whitespace after converting the tinyint to a char.
Deedrick: Earthnail: sqlfiddle.com is an easy way to share your schema, your data, and the queries you’re testing. It saves us time and makes it more likely that you’ll get an answer! Make sure you set it to use MySQL.
Freker: Naktibalda: sqlfiddle doesn’t work because my query dumps to a file. Nevertheless, here’s the code: http://sqlfiddle.com/#!9/905a25/1
Pavoni: Guys, doing sqli for school, looking for an example union select all form table where Admin=’Yes’
Wojenski: D0p : union allows you to combine the results of two otherwise independent quries
Brunk: Yep done it Pomeroy ty for support 😀
Hayase: All right, you’re welcome
Judkins: Earthnail: why do you set all parameters to empty string?
Arebela: See http://dev.mysql.com/doc/refman/5.6/en/select.html
Mearing: Naktibalda: just to be safe
Weemes: Naktibalda: I solved it using: castcharrow as binary1
Aholt: Earthnail: Why are you doing that CAST? http://sqlfiddle.com/#!9/905a25/3
Aholt: Yet another idiotic conversion done by sqlfiddle
Mcclenahan: Salle: what kind of conversion is ssqlfiddle doing there?
Aholt: Tinyint1 displayed as “true” Come on fiddle!
Ausbrooks: I can’t see how 10 could be base64 encoded to Cg
Aholt: Naktibalda: Something truly idiotic