• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 350
  • Last Modified:

mysql query length

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
yarekGmail
Asked:
yarekGmail
1 Solution
 
mahomeCommented:
Yes there is. Increase max_allowed_package value: http://dev.mysql.com/doc/refman/4.1/en/packet-too-large.html
0
 
Bobaran98Commented:
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
 
Tony McCreathTechnical SEO ConsultantCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Tackle projects and never again get stuck behind a technical roadblock.
Join Now