Solved

mysql query length

Posted on 2009-05-14
3
322 Views
Last Modified: 2013-12-12
Hello
My sql quesry (a simple update statement) is about 4000 chars long.
When I do execute it, it seems mysql cannot manage it because it is too long (mysql v3.4)
is there a way to resize mysql query capacity ?

regards
update parameters set msg_chat_public = "Public chat", msg_enter_nickname = "Enter your nickname", msg_enterEmail = "Enter your email", msg_show_my_webcam = "Showme  my webcam", 
msg_left_chat = " left the chat", msg_emailSent = "An email was sent. You must confirm your account befor enter the", msg_enterNickName = "Enter your username",
 msg_was_banned_by = " was banned from chat by", msg_select_user = "Select an user on right", msg_AccountVerified = "You accouny has been successfully verified. You can login to you", 
 msg_enterPassword = "Enter password", msg_clearButton = "Clear", msg_confirmPassword = "Confirm password", msg_delete = "DELETE", 
 forgottenOK = "The password has been sent to your email.", room_friends = "Room friends", msg_male = "Male", msg_newUserRegister = "New user ? Please register here !", 
 msg_notAutenitificate = "Your account has not been activated. Please check your email.", msg_chatters_online = "Chatters", msg_text_register = "Please register !",
 msg_createRoom = "Create Room", msg_change_room = "Change room", msg_room_sexy_description = "Room  sexy: only for adults !", msg_errorSelectUser = "Select an user on right", 
 msg_sendMeMyPassword = "Send my password", msg_autoriser_prives = "Autorize private", msg_room_friends_description = "Room friends... to make new friends",
 msg_myWebcam = "My webcam", msg_connectButton = "Connected", msg_parameter_webcam = "Parameter my webcam", msg_mailSubject = "Chat activation email",
 msg_autoriser_servermsg = "Allow server messages", webmasterid = "2", msg_refuse_prive = " declined the private chat",
 msg_emailContent = "Thank you for register. To access the video chat, please click o", msg_kick = "KICKED from chat !", msg_ignore = "Ignor user", 
 msg_closeChat = "Close chat with", msg_play_music = "Background music", msg_showCamera = "show camera", msg_webcams_obligatoires = "Webcam necessary", 
 msg_entered_chat = " enetered the chat", msg_status = "Status", date = "0000-00-00", msg_please_register = "Please register", msg_decide_ignore = "You decided to ignore", 
 doesNotExistMessage = "This username does not exist !", msg_create = "CREATE", msg_voudrait_prive = " requests a private chat. Do you agree ?", msg_female = "Female", 
 msg_enterRoomName = "Enter room name", msg_enterRoomDescription = "Enter room decsription", msg_login_chat = "Login chat", msg_forgottenPassword = "Forgotten password ?", 
 msg_size_text = "Text size", forgottenKO = "This username does not exist !", msg_enter_chat = "Enter the chat", msg_adminPanel = "Admin panel", msg_wantsToTalk = " wants to talk", 
 msg_connectedUsers = "Connected users", msg_register = "Register", msg_prive = "Private", msg_private = "Private", msg_next = "Next", msg_avaibleRooms = "Avaible rooms", 
 msg_passwordMisMatch = "Password do not match", msg_wantsTalk = "Wants talk", msg_volume = "Volume", room_sexy = "Room  sexy", msg_showInfos = "Show infos",
 bannedMessage = "You have been banned.", msg_resetTalk = "RESET TALK", resgitrationKO = "Registration failed: this username or email is already used.", 
 msg_chatRoom = "Chat", msg_chat_prive = "Private chat", msg_talk = "TALK", msg_bacground_color = "Background color", msg_reset_ignored = "Reset ignored users",
 msg_ban = "BANNED from chat !", msg_play_sound = "Sound", msg_time = "Time", msg_params = "Parameters", msg_areYouSure = "Are you sure you want to delete",
 msg_hasClosedChat = " has closed the chat", msg_chat_prive_avec = "Private chat with", msg_quitButton = "Exit", msg_register_click_here = "Click HERE to register NOW", 
 msg_choose_room = "Select an room", msg_you_are_in = "You are in room", msg_sendButton = "Send", msg_couple = "Couple", msg_talkControl = "TALK CONTROL",
 msg_already_present = " already present", msg_was_kicked_by = " was kicked from chat by", msg_join = "JOIN", resgitrationOK = "registration sucess. Thanks you", date = now() 
where webmasterid=1

Open in new window

0
Comment
Question by:yarekGmail
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 10

Accepted Solution

by:
mahome earned 500 total points
ID: 24382494
Yes there is. Increase max_allowed_package value: http://dev.mysql.com/doc/refman/4.1/en/packet-too-large.html
0
 
LVL 8

Expert Comment

by:Bobaran98
ID: 24390874
And don't forget that with an UPDATE statement, it's a simple matter to split it into two or more statements.  You simply update some of the variables the first time and some the second time.

Whew.  That really is a massive statement!  How did you end up with something so long?  Is this something that runs frequently?  It looks like maybe it's writing configuration settings, which I guess wouldn't happen all that often.

Still.  Wow. :-)
0
 
LVL 23

Expert Comment

by:Tony McCreath
ID: 24395067
I've created an ORM that auto generates the queries based on the data a client requested. I just emailed a developer a query he generated that included over 300 fields and 50 joins. And its response time was still quick!

Updates may have different limitations but I'd be surprised its so small. My ORM also automatically creates updates and I've never seen an error log related to this issue.

Your probem maybe the age of your MySql. Current version is 5.1.

I don't thing its the packet size. The default is well more than 4K

What is the actual error you get?
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MySQL HA and DR solution. 5 37
A responsive image gallery using flexbox 6 76
Form submit takes only for one form 23 52
How do I init a PHP page jusing JQuery? 8 29
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question