Added MySQL connector
This commit is contained in:
		
							parent
							
								
									9d19606abe
								
							
						
					
					
						commit
						af7f262a1c
					
				
							
								
								
									
										3
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							| @ -55,3 +55,6 @@ | |||||||
| [submodule "third_party/protobuf"] | [submodule "third_party/protobuf"] | ||||||
| 	path = third_party/protobuf | 	path = third_party/protobuf | ||||||
| 	url = https://github.com/google/protobuf.git | 	url = https://github.com/google/protobuf.git | ||||||
|  | [submodule "third_party/mysqlconnector"] | ||||||
|  | 	path = third_party/mysqlconnector | ||||||
|  | 	url = https://github.com/mysql/mysql-connector-cpp.git | ||||||
|  | |||||||
							
								
								
									
										25
									
								
								third_party/build_mysqlconnector.sh
									
									
									
									
										vendored
									
									
										Executable file
									
								
							
							
						
						
									
										25
									
								
								third_party/build_mysqlconnector.sh
									
									
									
									
										vendored
									
									
										Executable file
									
								
							| @ -0,0 +1,25 @@ | |||||||
|  | #!/usr/bin/env bash | ||||||
|  | 
 | ||||||
|  | source ../scripts/build_helper.sh | ||||||
|  | 
 | ||||||
|  | library_path="mysqlconnector" | ||||||
|  | requires_rebuild ${library_path} | ||||||
|  | [[ $? -eq 0 ]] && exit 0 | ||||||
|  | 
 | ||||||
|  | cd ${library_path} | ||||||
|  | HEADER=$(cat cdk/foundation/connection_openssl.cc) | ||||||
|  | if ! [[ "${HEADER:0:34}" == "#if !defined(SSL_ERROR_WANT_ASYNC)" ]]; then | ||||||
|  | 	echo "Creating new one!" | ||||||
|  | 	echo "#if !defined(SSL_ERROR_WANT_ASYNC) | ||||||
|  | 	#define SSL_ERROR_WANT_ASYNC 0xFFEEDDCC | ||||||
|  | #endif | ||||||
|  | #if !defined(SSL_ERROR_WANT_ASYNC_JOB) | ||||||
|  | 	#define SSL_ERROR_WANT_ASYNC_JOB 0xFFEECCDD | ||||||
|  | #endif | ||||||
|  | `cat cdk/foundation/connection_openssl.cc`" > cdk/foundation/connection_openssl.cc | ||||||
|  | fi | ||||||
|  | cd .. | ||||||
|  | 
 | ||||||
|  | cmake_build ${library_path} -DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++ -I../../boringssl/include/" -DWITH_JDBC=ON -DWITH_SSL="`pwd`/../../boringssl/" -DOPENSSL_ROOT_DIR="`pwd`/../../boringssl/" -DCMAKE_BUILD_TYPE=RelWithDebInfo | ||||||
|  | check_err_exit ${library_path} "Failed to build mysqlconnector!" | ||||||
|  | set_build_successful ${library_path} | ||||||
							
								
								
									
										1
									
								
								third_party/mysqlconnector
									
									
									
									
										vendored
									
									
										Submodule
									
								
							
							
								
								
								
								
								
								
									
									
								
							
						
						
									
										1
									
								
								third_party/mysqlconnector
									
									
									
									
										vendored
									
									
										Submodule
									
								
							| @ -0,0 +1 @@ | |||||||
|  | Subproject commit 7abcdc88c8235f02096e21b5bcd72e8312508f61 | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user