Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#4319 (ok 4.2) Truncated query while editing table with large amount of columns

4.1.9
fixed
1
2015-02-05
2014-03-08
No

When you try to edit (insert/modify) a table that have a large amount of columns (over 100), the query will result truncated causing an error.
For example, you can't insert a row in this table by using the PhpMyEdit editor page. The query result truncated to field "ee54":

CREATE TABLE IF NOT EXISTS test_large_amount (
id int(11) NOT NULL AUTO_INCREMENT,
model varchar(50) DEFAULT NULL,
mask char(2) DEFAULT NULL,
SOTIC char(5) DEFAULT NULL,
customer varchar(20) DEFAULT NULL,
protocol varchar(20) DEFAULT NULL,
Advanced tinyint(1) DEFAULT '0',
chamber varchar(20) DEFAULT NULL,
maxaddress int(11) DEFAULT '99',
old_addressmap tinyint(1) NOT NULL DEFAULT '0',
stby_l float DEFAULT NULL,
stby_h float DEFAULT NULL,
led_l float DEFAULT NULL,
led_h float DEFAULT NULL,
pw1 int(11) DEFAULT NULL,
pw2 int(11) DEFAULT NULL,
pw3 int(11) DEFAULT NULL,
pw4 int(11) DEFAULT NULL,
pw5 int(11) DEFAULT NULL,
pw6 int(11) DEFAULT NULL,
pw7 int(11) DEFAULT NULL,
pw8 int(11) DEFAULT NULL,
pw9 int(11) DEFAULT NULL,
pw1norm_l int(11) DEFAULT NULL,
pw1norm_h int(11) DEFAULT NULL,
pw2norm_l int(11) DEFAULT NULL,
pw2norm_h int(11) DEFAULT NULL,
pw3norm_l int(11) DEFAULT NULL,
pw3norm_h int(11) DEFAULT NULL,
pw4norm_l int(11) DEFAULT NULL,
pw4norm_h int(11) DEFAULT NULL,
pw4cal_th int(11) DEFAULT NULL,
pw5norm_l int(11) DEFAULT NULL,
pw5norm_h int(11) DEFAULT NULL,
pw6norm_l int(11) DEFAULT NULL,
pw6norm_h int(11) DEFAULT NULL,
pw7norm_l int(11) DEFAULT NULL,
pw7norm_h int(11) DEFAULT NULL,
pw8norm_l int(11) DEFAULT NULL,
pw8norm_h int(11) DEFAULT NULL,
pw9norm_l int(11) DEFAULT NULL,
pw9norm_h int(11) DEFAULT NULL,
pw1alarm_l int(11) DEFAULT NULL,
pw1alarm_h int(11) DEFAULT NULL,
pw2alarm_l int(11) DEFAULT NULL,
pw2alarm_h int(11) DEFAULT NULL,
pw3alarm_l int(11) DEFAULT NULL,
pw3alarm_h int(11) DEFAULT NULL,
pw4alarm_l int(11) DEFAULT NULL,
pw4alarm_h int(11) DEFAULT NULL,
pw5alarm_l int(11) DEFAULT NULL,
pw5alarm_h int(11) DEFAULT NULL,
pw6alarm_l int(11) DEFAULT NULL,
pw6alarm_h int(11) DEFAULT NULL,
pw7alarm_l int(11) DEFAULT NULL,
pw7alarm_h int(11) DEFAULT NULL,
pw8alarm_l int(11) DEFAULT NULL,
pw8alarm_h int(11) DEFAULT NULL,
pw9alarm_l int(11) DEFAULT NULL,
pw9alarm_h int(11) DEFAULT NULL,
pw9iron_l int(11) DEFAULT NULL,
pw9iron_h int(11) DEFAULT NULL,
pw9iroff_l int(11) DEFAULT NULL,
pw9iroff_h int(11) DEFAULT NULL,
pw6th1_l int(11) DEFAULT NULL,
pw6th1_h int(11) DEFAULT NULL,
pw6th2_l int(11) DEFAULT NULL,
pw6th2_h int(11) DEFAULT NULL,
pw6th3_l int(11) DEFAULT NULL,
pw6th3_h int(11) DEFAULT NULL,
pw6th4_l int(11) DEFAULT NULL,
pw6th4_h int(11) DEFAULT NULL,
pw6th5_l int(11) DEFAULT NULL,
pw6th5_h int(11) DEFAULT NULL,
pw6th6_l int(11) DEFAULT NULL,
pw6th6_h int(11) DEFAULT NULL,
pw6th7_l int(11) DEFAULT NULL,
pw6th7_h int(11) DEFAULT NULL,
pw6th8_l int(11) DEFAULT NULL,
pw6th8_h int(11) DEFAULT NULL,
numbytes int(11) DEFAULT NULL,
ee0 int(11) DEFAULT NULL,
ee1 int(11) DEFAULT NULL,
ee2 int(11) DEFAULT NULL,
ee3 int(11) DEFAULT NULL,
ee4 int(11) DEFAULT NULL,
ee5 int(11) DEFAULT NULL,
ee6 int(11) DEFAULT NULL,
ee7 int(11) DEFAULT NULL,
ee8 int(11) DEFAULT NULL,
ee9 int(11) DEFAULT NULL,
ee10 int(11) DEFAULT NULL,
ee11 int(11) DEFAULT NULL,
ee12 int(11) DEFAULT NULL,
ee13 int(11) DEFAULT NULL,
ee14 int(11) DEFAULT NULL,
ee15 int(11) DEFAULT NULL,
ee16 int(11) DEFAULT NULL,
ee17 int(11) DEFAULT NULL,
ee18 int(11) DEFAULT NULL,
ee19 int(11) DEFAULT NULL,
ee20 int(11) DEFAULT NULL,
ee21 int(11) DEFAULT NULL,
ee22 int(11) DEFAULT NULL,
ee23 int(11) DEFAULT NULL,
ee24 int(11) DEFAULT NULL,
ee25 int(11) DEFAULT NULL,
ee26 int(11) DEFAULT NULL,
ee27 int(11) DEFAULT NULL,
ee28 int(11) DEFAULT NULL,
ee29 int(11) DEFAULT NULL,
ee30 int(11) DEFAULT NULL,
ee31 int(11) DEFAULT NULL,
ee32 int(11) DEFAULT NULL,
ee33 int(11) DEFAULT NULL,
ee34 int(11) DEFAULT NULL,
ee35 int(11) DEFAULT NULL,
ee36 int(11) DEFAULT NULL,
ee37 int(11) DEFAULT NULL,
ee38 int(11) DEFAULT NULL,
ee39 int(11) DEFAULT NULL,
ee40 int(11) DEFAULT NULL,
ee41 int(11) DEFAULT NULL,
ee42 int(11) DEFAULT NULL,
ee43 int(11) DEFAULT NULL,
ee44 int(11) DEFAULT NULL,
ee45 int(11) DEFAULT NULL,
ee46 int(11) DEFAULT NULL,
ee47 int(11) DEFAULT NULL,
ee48 int(11) DEFAULT NULL,
ee49 int(11) DEFAULT NULL,
ee50 int(11) DEFAULT NULL,
ee51 int(11) DEFAULT NULL,
ee52 int(11) DEFAULT NULL,
ee53 int(11) DEFAULT NULL,
ee54 int(11) DEFAULT NULL,
ee55 int(11) DEFAULT NULL,
ee56 int(11) DEFAULT NULL,
ee57 int(11) DEFAULT NULL,
ee58 int(11) DEFAULT NULL,
ee59 int(11) DEFAULT NULL,
ee60 int(11) DEFAULT NULL,
ee61 int(11) DEFAULT NULL,
ee62 int(11) DEFAULT NULL,
ee63 int(11) DEFAULT NULL,
ee64 int(11) DEFAULT NULL,
ee65 int(11) DEFAULT NULL,
ee66 int(11) DEFAULT NULL,
ee67 int(11) DEFAULT NULL,
ee68 int(11) DEFAULT NULL,
ee69 int(11) DEFAULT NULL,
ee70 int(11) DEFAULT NULL,
ee71 int(11) DEFAULT NULL,
ee72 int(11) DEFAULT NULL,
ee73 int(11) DEFAULT NULL,
ee74 int(11) DEFAULT NULL,
ee75 int(11) DEFAULT NULL,
ee76 int(11) DEFAULT NULL,
ee77 int(11) DEFAULT NULL,
ee78 int(11) DEFAULT NULL,
ee79 int(11) DEFAULT NULL,
ee80 int(11) DEFAULT NULL,
ee81 int(11) DEFAULT NULL,
ee82 int(11) DEFAULT NULL,
ee83 int(11) DEFAULT NULL,
ee84 int(11) DEFAULT NULL,
ee85 int(11) DEFAULT NULL,
ee86 int(11) DEFAULT NULL,
ee87 int(11) DEFAULT NULL,
ee88 int(11) DEFAULT NULL,
ee89 int(11) DEFAULT NULL,
ee90 int(11) DEFAULT NULL,
ee91 int(11) DEFAULT NULL,
ee92 int(11) DEFAULT NULL,
ee93 int(11) DEFAULT NULL,
ee94 int(11) DEFAULT NULL,
ee95 int(11) DEFAULT NULL,
ee96 int(11) DEFAULT NULL,
ee97 int(11) DEFAULT NULL,
ee98 int(11) DEFAULT NULL,
ee99 int(11) DEFAULT NULL,
ee100 int(11) DEFAULT NULL,
ee101 int(11) DEFAULT NULL,
ee102 int(11) DEFAULT NULL,
ee103 int(11) DEFAULT NULL,
ee104 int(11) DEFAULT NULL,
ee105 int(11) DEFAULT NULL,
ee106 int(11) DEFAULT NULL,
ee107 int(11) DEFAULT NULL,
ee108 int(11) DEFAULT NULL,
ee109 int(11) DEFAULT NULL,
ee110 int(11) DEFAULT NULL,
ee111 int(11) DEFAULT NULL,
ee112 int(11) DEFAULT NULL,
ee113 int(11) DEFAULT NULL,
ee114 int(11) DEFAULT NULL,
ee115 int(11) DEFAULT NULL,
ee116 int(11) DEFAULT NULL,
ee117 int(11) DEFAULT NULL,
ee118 int(11) DEFAULT NULL,
ee119 int(11) DEFAULT NULL,
ee120 int(11) DEFAULT NULL,
ee121 int(11) DEFAULT NULL,
ee122 int(11) DEFAULT NULL,
ee123 int(11) DEFAULT NULL,
ee124 int(11) DEFAULT NULL,
ee125 int(11) DEFAULT NULL,
ee126 int(11) DEFAULT NULL,
ee127 int(11) DEFAULT NULL,
lastchange timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

Discussion

  • This problem is not with phpMyAdmin.
    This issue is related to your local/remote server's php configuration stored in "php.ini" file.

    There is a variable in "php.ini" named "max_input_vars" which denotes how many input variables may be accepted (limit is applied to $_GET, $_POST and $_COOKIE superglobal separately) by a php script.

    The default value of "max_input_vars" is 1000 and the "Edit/Insert Form" in phpMyAdmin of your table is
    sending roughly 3343 variables which is higher than the default value, that's why the POST data is getting truncated. Thus, actually
    phpMyAdmin is working absolutely fine.

    So make sure you adjust your "max_input_vars" value to a value greater than 3343 and also adjust other relevant variables like "post_max_size", "memory_limit", "max_execution_time", "max_input_time" etc. in your "php.ini" file accordingly.

    Official Documentation: http://www.php.net/manual/en/info.configuration.php#ini.max-input-vars

    Thanks.

     
  • Dhananjay
    Dhananjay
    2014-03-09

    Should not we give an appropriate msg on such events. Like a possible msg could be a link pointing to related online-documentation.
    What do you all devs feel on this..??

     
  • Marc Delisle
    Marc Delisle
    2014-03-09

    Daniele,
    are you talking about phpMyAdmin or phpMyEdit?

     
  • PhpMyAdmin. Sorry. I wrote PHPMyEdit by mistake.
    Thanks for reply to Ashutosh. I will check this entry.
    Only one question: PhpmyAdmin v3 doesn't have this issue. It's PHpMyAdmin v4 that use more POST parameters than the older version?

     
  • Daniele,
    does this solve your problem ?

     
  • Yes Dhundhara. Your solution works. Thanks to all

     
  • Marc Delisle
    Marc Delisle
    2014-04-05

    Warning added for 4.2.

     
  • Marc Delisle
    Marc Delisle
    2014-04-05

    • summary: Truncated query while editing table with large amount of columns --> (ok 4.2) Truncated query while editing table with large amount of columns
    • status: open --> resolved
    • assigned_to: Hugues Peccatte
    • Priority: 5 --> 1
     
  • Marc Delisle
    Marc Delisle
    2014-05-08

    • status: resolved --> fixed