TShopping

 找回密碼
 註冊
搜索
查看: 1831|回復: 0

[問題] tag太多,導致發帖報錯

[複製鏈接]
發表於 2013-7-17 22:08:44 | 顯示全部樓層 |閱讀模式
 
Push to Facebook
昨天在為一個用戶排查發帖報錯時遇到如下錯誤:
  1. Discuz! Database Error The database has encountered a problem. Need Help? Error messages:
  2. [Type] 查詢語句錯誤     [1062] Duplicate entry '65535' for key 1
  3. [Query] INSERT INTO common_tag (tagname, status) VALUES ('通話時間', '0')
  4. Program messages:
  5. forum.php(require)
  6. source/module/forum/forum_post.php(require_once)
  7. source/include/post/post_editpost.php(modthreadtag)
  8. source/function/function_forum.php(DB::query)
複製代碼
去看了一下,原來是tags過多,自動增長的id超出了mysql默認的最大值,這裡只要找到pre_common_tag表中,tagid的類型由smallint改為mediumint類型,長度/值改為8.增大一下默認的tag個數。

當然一般的網站可能不會有這麼多的站,像手機站這種tag比較多的站點注意一下這個問題!


 

臉書網友討論
*滑块验证:
您需要登錄後才可以回帖 登錄 | 註冊 |

本版積分規則



Archiver|手機版|小黑屋|免責聲明|TShopping

GMT+8, 2024-4-16 20:13 , Processed in 0.168793 second(s), 23 queries .

本論壇言論純屬發表者個人意見,與 TShopping綜合論壇 立場無關 如有意見侵犯了您的權益 請寫信聯絡我們。

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表