Last active
August 1, 2022 22:26
-
-
Save mliezun/2820b582ba8a56aecec85abb606ce640 to your computer and use it in GitHub Desktop.
Installing mysql on debug mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euxo pipefail | |
## Download and build mysql server | |
git clone https://github.com/mysql/mysql-server.git | |
cd mysql-server | |
git apply ../mysql-server.patch | |
cd .. | |
mkdir mysql-server-bld | |
cd mysql-server-bld | |
cmake -DDOWNLOAD_BOOST=1 -DWITH_BOOST="$(pwd)/boost" -DWITH_DEBUG=1 ../mysql-server | |
make -j8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/sql/sp_head.cc b/sql/sp_head.cc | |
index 20553a145b8..c50a025ba04 100644 | |
--- a/sql/sp_head.cc | |
+++ b/sql/sp_head.cc | |
@@ -3159,7 +3159,7 @@ void sp_head::opt_mark() { | |
#ifndef NDEBUG | |
bool sp_head::show_routine_code(THD *thd) { | |
Protocol *protocol = thd->get_protocol(); | |
- char buff[2048]; | |
+ char buff[2048 * 4]; | |
String buffer(buff, sizeof(buff), system_charset_info); | |
sp_instr *i; | |
bool full_access; | |
diff --git a/sql/sp_instr.cc b/sql/sp_instr.cc | |
index 2ae19e42e9f..cd6970a0054 100644 | |
--- a/sql/sp_instr.cc | |
+++ b/sql/sp_instr.cc | |
@@ -273,8 +273,8 @@ static bool subst_spvars(THD *thd, sp_instr *instr, LEX_CSTRING query_str) { | |
// uints). | |
/////////////////////////////////////////////////////////////////////////// | |
-#define SP_INSTR_UINT_MAXLEN 8 | |
-#define SP_STMT_PRINT_MAXLEN 40 | |
+#define SP_INSTR_UINT_MAXLEN 4096 | |
+#define SP_STMT_PRINT_MAXLEN 4096 | |
/////////////////////////////////////////////////////////////////////////// | |
// sp_lex_instr implementation. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment